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.

I can''t answer all your questions right now, but I can answer the first: 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 cbotts1 at cox.net 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. > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help > >

Since Spencer Graves already answered the factorial questions, I''ll try to answer one of the other two: On Monday 15 December 2003 05:17, cbotts1 at cox.net wrote:> To anyone who can help, > > 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?Is "rnd.dsgn" a variable in "data.mtrx"? That is how I always fit lme models, and never encountered the problem you describe. R. P.S. "Stupid question # 2" I think has been asked (and answered) several times in this list in the past.> > Any help would be greatly appreciated. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help-- Ram?n D?az-Uriarte Bioinformatics Unit Centro Nacional de Investigaciones Oncol?gicas (CNIO) (Spanish National Cancer Center) Melchor Fern?ndez Almagro, 3 28029 Madrid (Spain) Fax: +-34-91-224-6972 Phone: +-34-91-224-6900 http://bioinfo.cnio.es/~rdiaz PGP KeyID: 0xE89B3462 (http://bioinfo.cnio.es/~rdiaz/0xE89B3462.asc)