[R] Help about nlminb function
Jonathan P Daily
jdaily at usgs.gov
Wed Dec 15 15:54:34 CET 2010
Your function is evaluating to Inf. Is this expected behavior? I don't
know what starting values you are using, but it looks like the initial
values evaluate to Inf. If this is also true for values near your initial
conditions then I am not surprised the optimization returns initial
values.
Try changing parametres[,3]
--------------------------------------
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
"Is the room still a room when its empty? Does the room,
the thing itself have purpose? Or do we, what's the word... imbue it."
- Jubal Early, Firefly
kamel gaanoun <kamel.gaanoun at gmail.com> wrote on 12/15/2010 09:22:57 AM:
> [image removed]
>
> Re: [R] Help about nlminb function
>
> kamel gaanoun
>
> to:
>
> Jonathan P Daily
>
> 12/15/2010 09:23 AM
>
> Cc:
>
> r-help, r-help-bounces
>
> I appologize for the lack of information in my previous mail, but it
> is my first one.
>
> Yes I red -in part- the Port documentation to learn what does the
> message X-convergence (3) mean.
>
> so this is my nlminb and the results :
>
> res1<-nlminb(parametres[,3], V, lower=c(rep(0.01, 18), rep(0.01, 3),
> rep(-Inf, 6)), upper=c(rep(Inf, 18), rep(0.99, 3), rep(Inf, 6)),
> control = list(maxit=1000) )
>
>
> Results : > res1
> $par
> [1] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
1.0000000
> [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
1.0000000
> [15] 1.0000000 1.0000000 1.0000000 1.0000000 0.6899225 0.7993528
0.6480687
> [22] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
>
> $objective
> [1] Inf
>
> $convergence
> [1] 0
>
> $message
> [1] "X-convergence (3)"
>
> $iterations
> [1] 1
>
> $evaluations
> function gradient
> 2 27
>
>
> So as you see, it stops after just one iteration but it is converging.
>
>
> Thanks
> 2010/12/15 Jonathan P Daily <jdaily at usgs.gov>
> How are we supposed to help you if we have no idea how you are using it?
> Did you read the PORT documentation? Did you look at the control
> parameters outlined in the function help page? Often times for me a
return
> of the initial conditions is an issue with either inappropriate
tolerance
> or having variables on very different scales.
>
> Since you did not follow the posting guide (important part *'d below),
my
> only suggestion is to ?nlminb
> --------------------------------------
> Jonathan P. Daily
> Technician - USGS Leetown Science Center
> 11649 Leetown Road
> Kearneysville WV, 25430
> (304) 724-4480
> "Is the room still a room when its empty? Does the room,
> the thing itself have purpose? Or do we, what's the word... imbue it."
> - Jubal Early, Firefly
>
> r-help-bounces at r-project.org wrote on 12/15/2010 08:53:39 AM:
>
> > [image removed]
> >
> > [R] Help about nlminb function
> >
> > kamel gaanoun
> >
> > to:
> >
> > r-help
> >
> > 12/15/2010 08:56 AM
> >
> > Sent by:
> >
> > r-help-bounces at r-project.org
> >
> > Hi Everyone,
> >
> > Can anyone help me resolve a problem that i'm having with nlminb.
The
> > problem is that it stops after just one iteration and returns the same
> > values as "start" ones.
> >
> >
> > Thank you very much for your help.
> >
> >
> > Sincerely.
> >
> >
> > --
> > Kamel Gaanoun
> > (+33) (0)6.76.04.65.77
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
>
******************************************************************************
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
******************************************************************************
>
>
>
> --
> Kamel Gaanoun
> (+33) (0)6.76.04.65.77
More information about the R-help
mailing list