On 14-04-2011, at 09:00, Kristian Lind wrote:
> HI Berend,
>
> Thank you for your reply.
>
> ..
> Finally the likelihood function at the end of your code
>
> #Maximum likelihood estimation using mle package
> library(stats4)
> #defining loglikelighood function
> #T <- length(v)
> #minusl
HI Berend,
Thank you for your reply.
2011/4/13 Berend Hasselman
> Questions:
>
> 1. why are you defining Bo within a loop?
> 2. Why are you doing library(nleqslv) within the loop?
>
> Yes, I see what you mean. There's no reason for defining that within the
loop.
Doing both those statements out
Questions:
1. why are you defining Bo within a loop?
2. Why are you doing library(nleqslv) within the loop?
Doing both those statements outside the loop once is more efficient.
In your transdens function you are not using the function argument
parameters, why?
Shouldn't there be a with(paramete
Albyn and others,
Thank you for your replies.
In order to be more specific I've constructed my program. I know it's long
and in some places quite messy. It works until the last part where the
log-likelihood function has to be defined and maximized wrt the parameters.
The log-likelihood has the fo
to clarify: by "if you knew that LL(psi+eps) were well approximated
by LL(psi), for the values of eps used to evaluate numerical
derivatives of LL. "
I mean the derivatives of LL(psi+eps) are close to the derivatives of LL(psi),
and perhaps you would want the hessian to be close as well.
alb
Hi Kristian
The obvious approach is to treat it like any other MLE problem: evaluation
of the log-likelihood is done as often as necessary for the optimizer
you are using: eg a call to optim(psi,LL,...) where LL(psi) evaluates
the log likelihood at psi. There may be computational shortcuts
6 matches
Mail list logo