Re: [R] EM algorithm to find MLE of coeff in mixed effects model

2012-07-05 Thread John Kane
I don't believe that R-help permits pdf files. A useful workaround is to post it to a file hosting site like MediaFire and post the link here. John Kane Kingston ON Canada -Original Message- From: jimmycl...@gmail.com Sent: Wed, 4 Jul 2012 22:56:02 -0400 To: pauljoh...@gmail.com

Re: [R] EM algorithm to find MLE of coeff in mixed effects model

2012-07-05 Thread Jie
Seems that I found the problem. The degree of freedom was missing as a denominator... Thank you for your help. Best wishes, Jie On Thu, Jul 5, 2012 at 9:28 AM, John Kane jrkrid...@inbox.com wrote: I don't believe that R-help permits pdf files. A useful workaround is to post it to a file

Re: [R] EM algorithm to find MLE of coeff in mixed effects model

2012-07-04 Thread Jie
Dear Paul, Thank you for your suggestion. I was moved by the fact that people are so nice to help learners and ask for nothing. With your help, I made some changes to my code and add more comments, try to make things more clear. If this R email list allow me to upload a pdf file to illustrate the

[R] EM algorithm to find MLE of coeff in mixed effects model

2012-07-03 Thread jimmycloud
I have a general question about coefficients estimation of the mixed model. I simulated a very basic model: Y|b=X*\beta+Z*b +\sigma^2* diag(ni); b follows N(0,\psi) #i.e. bivariate normal where b is the latent variable, Z and X are

Re: [R] EM algorithm to find MLE of coeff in mixed effects model

2012-07-03 Thread Paul Johnson
On Tue, Jul 3, 2012 at 12:41 PM, jimmycloud jimmycl...@gmail.com wrote: I have a general question about coefficients estimation of the mixed model. I have 2 ideas for you. 1. Fit with lme4 package, using the lmer function. That's what it is for. 2. If you really want to write your own EM