Sorry, I missed something.

# lme() output;
fixed: 66.5
random: *24.80547 4.020779* (sd)


This is the output from optim(). The 1st element is the same as the lme
output.
> optim(c(66.5,5,2), reml, control=list(reltol=1e-20))$par
[1] 66.500000  6.422128  2.782951

The 2nd and 3rd need to transformed as the following;

> sqrt(exp(c(6.422128,2.782951)))
[1] 24.805465  4.020778

Then, all are the same as lme output.



On Thu, Jan 14, 2010 at 2:48 PM, Juliet Hannah <juliet.hannah@gmail.com>wrote:

> Hi List,
>
> I'm trying to learn more about mixed models in detail. Does anyone know of
> any examples where code is provided showing simple examples of doing
> this from scratch. For example, setting up a likelihood, using optim, and
> things
> like that.
>
> Thanks,
>
> Juliet
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



-- 
안재형
4033 Remington Oaks Circle
Cary, NC 27519
http://cahn88.blogspot.com/

	[[alternative HTML version deleted]]


