[R-sig-eco] Doubt about mle2, optim and convergence

Eduard Szöcs szoecs at uni-landau.de
Wed Nov 12 14:27:11 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hai Mario,

take a look at Ben Bolkers 'Ecological Models and Data in R'. The
chapter 'Optimization and all that' therein should be a good reference.

Cheers,

Eduard Szöcs



On 12/11/14 13:36, Mario José Marques wrote:
> Hi all!
> 
> I am working with species abundance distribution using biomass as
> abundance measure. For this, I am trying to fit models gamma, weibull
> and lognormal to my data.
> 
> I have problems specially with gamma and weibull. When I try fit this
> models, the mle2 fit without error, but the fit not converge. When I try
> plot profile with profile function, this function return that have found
> a better fit to data. Then I use this mles found by profile and try fit
> with mle2 again. I do this three or four times until no have problems to
> use profile to plot mles found.
> 
> I read Bolker text (2014 bbmle; Maximum likelihood estimation and
> analysis with the bbmle package) and found the parameters control and
> parscale (parameters of optim) that solve the problem to fit. I did this:
> 
> # Search for mle. Without convergence
> g1_gamma <- fitgamma(g1, trueLL = FALSE, start.value = mlegamma(g1))
> 
> # Search for mle. Converged
> g1_gamma <- fitgamma(g1, trueLL = FALSE,
> control=list(parscale=mlegamma(g1)))
> 
> I am using sads package that use mle2 to fit model to data. Function
> mlegamma calculate the start values to mle2 and fitgamma use mle2 with
> dgamma to search mles. (the problem is the same if I use only mle2
> without function of sads package).
> 
> I can not understand what control parameters do. I read something, but
> not understood at all. Could someone explain or recommend me some text
> to understand that?
> 
> Thank you and best regards!
> 
> 
> 
> Mario José
> ...................................................
> Doctoral student in Ecology
> Institute of Biology, Dept. Plant Biology
> State University of Campinas - UNICAMP
> Campinas, São Paulo, Brazil
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> 

- -- 
Eduard Szöcs
Quantitative Landscape Ecology
Institute for Environmental Sciences
University Koblenz-Landau
Fortstrasse 7
76829 Landau
Germany
http://www.uni-koblenz-landau.de/campus-landau/faculty7/environmental-sciences/landscape-ecology/Staff/eduardszoecs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUY2AvAAoJEK3OBW85la/OMw8H/0Y0YjThHCfgJzFzjEJ1TCaL
gIQxQJNQctobbjeAGbP8hep3e8vGalEo1sYHba21pCCJkNbZ1YhyMAt8AxwoY+Vy
v/eLVZPLLciPjwn5R5kLx3sE9vzdWJltiDibm0PJs2GM0cBppPilpPQDl+A6Z8xN
TQuXuLB6KCMPPXDNOOPAT6eBGt7EnsVUyhyJzKT0yVq7cc7To1O8KRwpD/IpwCyU
QVbT+FbH+f1RR+EgmjeFN4u3ircnNp0n6qaQgbJjTML+2czbPDjq9sLsbYVqrS4k
IYIGiyTj6okZP1LGYLtHO8pgqQZO7somjY0nX/sMm5scgsWeJNZ8etpA3OwBvfg=
=/z/u
-----END PGP SIGNATURE-----



More information about the R-sig-ecology mailing list