similar to: model matrix for random effects (lme)

Displaying 20 results from an estimated 20000 matches similar to: "model matrix for random effects (lme)"

2009 Mar 23
1
Extracting SD of random effects from lme object
Hello, How do I get the standard deviations for the random effects out of the lme object? I feel like there's probably a simple way of doing this, but I can't see it. Using the first example from the documentation: > fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age > fm1 Linear mixed-effects model fit by REML Data: Orthodont Log-restricted-likelihood:
2006 Jul 24
3
standardized random effects with ranef.lme()
Using ranef() (package nlme, version 3.1-75) with an 'lme' object I can obtain random effects for intercept and slope of a certain level (say: 1) - this corresponds to (say level 1) "residuals" in MLWin. Maybe I'm mistaken here, but the results are identical. However, if I try to get the standardized random effects adding the paramter "standard=T" to the
2005 Sep 01
2
VarCorr function for assigning random effects: was Question
If you are indeed using lme and not lmer then the needed function is VarCorr(). However, 2 recommendations. First, this is a busy list and better emails subject headers get better attention. Second, I would recommend using lmer as it is much faster. However, VarCorr seems to be incompatible with lmer and I do not know of another function to work with lmer. Hence, a better email subject header
2006 Aug 23
0
Random structure of nested design in lme
Why are the results not reliable? ________________________________ From: ESCHEN Rene [mailto:rene.eschen@unifr.ch] Sent: Wednesday, August 23, 2006 3:48 AM To: Spencer Graves; r-help@stat.math.ethz.ch Cc: Doran, Harold Subject: RE: [R] Random structure of nested design in lme The output of the suggested lmer model looks very similar to the output of aov, also when I ran the model
2006 Jun 01
1
setting the random-effects covariance matrix in lme
Dear R-users, I have longitudinal data and would like to fit a model where both the variance-covariance matrix of the random effects and the residual variance are conditional on a (binary) grouping variable. I guess the model would have the following form (in hierarchical notation) Yi|bi,k ~ N(XiB+Zibi, sigmak*Ident) bi|k ~ N(0, Dk) K~Bernoulli(p) I can obtain different sigmas (sigma0 and
2006 Mar 29
1
Lmer BLUPS: was(lmer multilevel)
Paul: I may have found the issue (which is similar to your conclusion). I checked using egsingle in the mlmRev package as these individuals are strictly nested in this case: library(mlmRev) library(nlme) fm1 <- lme(math ~ year, random=~1|schoolid/childid, egsingle) fm2 <- lmer(math ~ year +(1|schoolid:childid) + (1|schoolid), egsingle) Checking the summary of both models, the output is
2005 Aug 18
0
[SPAM] - Re: How to assess significance of random effect in lme4 - Bayesian Filter detected spam
Actually, I re-read the post and think it needs clarification. We may both be right. If the question is "I am building a model and want to know if I should retain this random effect?" (or something like that) then the LRT should be used to compare the fitted model against another model. This would be accomplished via anova(). In other multilevel programs, the variance components are
2010 Oct 18
1
Question about lme (mixed effects regression)
Hello! If I run this example: library(nlme) fm1 <- lme(distance ~ age+Sex, Orthodont, random = ~ age + Sex| Subject) If I run: summary(fm1) then I can see the fixed effects for age and sex (17.7 for intercept, 0.66 for age, and -1.66 for SexFemale) If I run: ranef(fm1) Then it looks like it's producing the random effects for each subgroup (in this example - each subject). For example,
1999 Jun 02
0
Sv: lme problem ?
Dear Douglas Bates. I just downloaded the compiled version (I'm a poor Windows devil, not yet having found the time to move to a more advanced platform...) from NT- the files are dated 30.5-1999 so they are not old - and the problem persisted....wonder what I did wrong ? R : Copyright 1999, The R Development Core Team Version 0.64.0 Patched (May 3, 1999) R is free software and comes with
2005 Jun 08
0
bug in predict.lme?
Dear All, I've come across a problem in predict.lme. Assigning a model formula to a variable and then using this variable in lme (instead of typing the formula into the formula part of lme) works as expect. However, when performing a predict on the fitted model I gan an error messag - predict.lme (but not predictlm) seems to expect a 'properly' typed in formula and a cannot extract
1999 Nov 27
0
lme
Doug, I thought perhaps that you might be interested in the comparison of lme to the results for the same models fitted by Richard Jones' carma (I just wrote the R interface to his Fortran code). The code to run the example from the lme help and for the equivalent with carma is in the file below. The two main differences in results are 1. the random coefficients covariance matrix is quite
2024 Jan 08
1
how to specify uncorrelated random effects in nlme::lme()
Dear professor, I'm using package nlme, but I can't find a way to specify two uncorrelated random effects. For example, a random intercept and a random slope. In package lme4, we can specify&nbsp;x + (x ll g) to realize, but how in nlme? Thanks! ???????????????????????? Zhen Wang Graduate student, Department of Medical Statistics, School of Public Health, Sun Yat-sen
2005 Oct 26
1
R-help Digest, Vol 32, Issue 26
r-help at stat.math.ethz.ch on Wednesday, October 26, 2005 at 6:00 AM -0500 wrote: Ronaldo, Try Harold's suggestion. The df still won't agree, because lmer (at least in its current version) just puts an upper bound on the df. But that should be OK, because all those t tests are approximations anyways, and you can get better confidence intervals (credible intervals, whatever) by using the
2006 Apr 13
3
Penalized Splines as BLUPs using lmer?
Dear R-list, I?m trying to use the lmer of the lme4 package to fit a linear mixed model of the form Y = Xb + Zu + e and I can?t figure out how to control the covariance structure of u. I want u ~ N(0,sigma^2*I). More precisely I?m trying to smooth a curve through data using the "Penalized Splines as BLUPs" method as described in Ruppert, Wand & Carroll (2003). So I have Z = [Z1
2008 Aug 11
1
Simple lme/lmer random effects questions
Hello, I have two very rudimentary questions regarding the random effects terms in the lme and lmer functions. I apologize if this also partly strays into a general statistics question, but I'm a bit new to this all. So hopefully it'll be a quick problem to sort out... Here is my experimental setup: I raised butterflies in 5 different testing chambers all set to different
1999 Jul 01
1
lme
I am using rw0641. In my continuing quest to understand repeated measures analysis, I again return to lme. I exported the Potthoff and Roy data Orthodont.dat from S-PLUS 4.5 to avoid capture errors and ran the examples in the R help. I imported the data.frame with data <- read.table("Orthodont.dat",header=T) attach(data) and created the objects Orthodont.fit1 <-
2008 May 09
1
Using lme() inside a function
Dear R-help I'm working on a large dataset which I have divided into 20 subsets based on similar features. Each subset consists of observations from different locations and I wish to use the location as a random effect. For each group I want to select regressors by a stepwise procedure and include a random effect on the intercept. I use stepAIC() and lme(). (The lmer()-function doesn't
2008 May 09
2
How can one make stepAIC and lme
Dear R-help I'm working on a large dataset which I have divided into 20 subsets based on similar features. Each subset consists of observations from different locations and I wish to use the location as a random effect. For each group I want to select regressors by a stepwise procedure and include a random effect on the intercept. I use stepAIC() and lme(). (The lmer()-function doesn't
2002 Dec 17
1
lme invocation
Hi Folks, I'm trying to understand the model specification formalities for 'lme', and the documentation is leaving me a bit confused. Specifically, using the example dataset 'Orthodont' in the 'nlme' package, first I use the invocation given in the example shown by "?lme": > fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age Despite the
2006 May 27
1
Recommended package nlme: bug in predict.lme when an independent variable is a polynomial (PR#8905)
Full_Name: Renaud Lancelot Version: Version 2.3.0 (2006-04-24) OS: MS Windows XP Pro SP2 Submission from: (NULL) (82.239.219.108) I think there is a bug in predict.lme, when a polynomial generated by poly() is used as an explanatory variable, and a new data.frame is used for predictions. I guess this is related to * not * using, for predictions, the coefs used in constructing the orthogonal