Re: [R] Help with maximum likelihood estimation
Bricks fly fine with sufficient thrust, but you have lff with a mu argument that never gets used, so the negative log-likelihood is constant and mle() cannot minimize it. You need to read up on the definition of (log-) likelihood and write a proper one for your problem. -pd > On 26 Jun 2019, at 14:01 , avadhoot velankar > wrote: > > I am analyzing animal movement pattern using levy flight pattern and want > to fit power function to observed data and estimate exponent using Maximum > Likelihood Estimation. > > I am using > > lff<-function(mu){1-1/mean(log(x))} > library(stats4) > mle(lff, start = list(mu = 1)) > > where x is the observed data. > > I am getting following error > > Error in solve.default(oout$hessian) : > Lapack routine dgesv: system is exactly singular: U[1,1] = 0 > > This is first time i am writing function and I am as good at algebra > as brick is good at flying. > > Thank you in advance for your help. > > -- > *Avadhoot D. Velankar* > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
[R] Help with maximum likelihood estimation
I am analyzing animal movement pattern using levy flight pattern and want to fit power function to observed data and estimate exponent using Maximum Likelihood Estimation. I am using lff<-function(mu){1-1/mean(log(x))} library(stats4) mle(lff, start = list(mu = 1)) where x is the observed data. I am getting following error Error in solve.default(oout$hessian) : Lapack routine dgesv: system is exactly singular: U[1,1] = 0 This is first time i am writing function and I am as good at algebra as brick is good at flying. Thank you in advance for your help. -- *Avadhoot D. Velankar* [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Re: [R] help in maximum likelihood estimation
Le 28/03/2016 22:19, heba eldeeb via R-help a écrit : Dear AllI'm trying to find the maximum likelihood estimator of a certain distribution using nlm command but I receive an error as: non-finite value supplied by 'nlm' can't figure out what is wrong in my function Any help? Thank you in advance Hi, Whitout rproducible example, it will be impossible to help you efficiently. See https://www.r-project.org/posting-guide.html Anyway, this error means that your function returns NA or error for some combination of parameters. Marc __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
[R] help in maximum likelihood estimation
Dear AllI'm trying to find the maximum likelihood estimator of a certain distribution using nlm command but I receive an error as: non-finite value supplied by 'nlm' can't figure out what is wrong in my function Any help? Thank you in advance [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.