Have you considered "gamma": n! = gamma(n+1)
> gamma(1+1:6) [1] 1 2 6 24 120 720
Regarding the other two, have you consulted Pinhiero and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer)? Bates and his graduate student (including Pinhiero) developed most of mle, and I have found the book to be quite valuable -- if not essential for using lme.
hope this helps.
spencer graves[EMAIL PROTECTED] wrote:
To anyone who can help,
I have two stupid questions, and one fairly intelligent question
Stupid question (1): is there an R function to calculate a factorial of a number? That is...is there a function g(.) such that g(3) = 6, g(4) = 24, g(6) = 720, etc?
Stupid question (2): how do you extract the estimated covariance matrix of the random effects in an lme object?
Intelligent question (1) I keep on trying to fit a linear mixed model in R using 'lme(y~fxd.dsgn, data = data.mtrx, ~rnd.dsgn|group)' where fxd.dsgn and rnd.dsgn are the fixed and random design matrices, respectively. The function won't work, though. It keeps telling me that it can't find the object 'rnd.dsgn'. What's the matter here?
Any help would be greatly appreciated.
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
