[R] Optim function & Hessian matrix
David Winsemius
dwinsemius at comcast.net
Tue Nov 19 22:10:23 CET 2013
On Nov 19, 2013, at 12:09 PM, sofeira taajobian wrote:
> Dear R Users
> Hi,
>
>
> I have very emergency problems in my programming about finding MLE
> with optim command. I reproduced it with real data. I guess that my
> function object in optim is very sensitive because it has power
> function .
> Then optim give me lower or initial values for estimates with these
> warnings for Hessian matrix computation:
> 1: In log(B2 * (C2^(y + v))) : NaNs produced
> 2: In log(B3 * C3^(x + u1)) : NaNs produced
> 3: In log(B4 * C4^(y + u2)) : NaNs produced
> 4: In log(B1 * (C1^(x + v))) : NaNs produced
> But I have in result a hessian matrix with only first (2*2) block and
> other values are zero.
> It would not be the problem of code lead to this. plz check the code
> and data, I attach them with this email. hope it can reduce some
> workload as copying and pasting.
>
>
> what may lead to this and any possible way to solve it? any suggestion
> are appreciated. Plz help me as soon as possible because I don’t have
> enough time.
> <data4.txt>
Only the txt file made it throuhg. If you attached a .R file it would have been scrubbed. You need to rename it <something>.txt so you mailer sends it as MIME-text rather than "unknown"-type.
> ______________________________________________
> 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.
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list