similar to: VarCorr function for assigning random effects: was Question

Displaying 20 results from an estimated 400 matches similar to: "VarCorr function for assigning random effects: was Question"

2011 Jan 19
2
VarCorr
I have a loop that I would like to use to extract the "stddev" for each itteration so I can average the "stddev" for all the runs. It would be helpful to know how to extract the "stddev" for each run from the VarCorr. Thanks MCruns<-1000 sighatlvec<-rep(NA,MCruns) sighatbvec<-rep(NA,MCruns) sighatevec<-rep(NA,MCruns) for(mc in 1:MCruns) {
2012 May 01
1
VarCorr procedure from lme4
Folks In trying to use lmer for a hierarchical model, I encountered the following message: Error in UseMethod("VarCorr") : no applicable method for 'VarCorr' applied to an object of class "mer" foo.mer <- lmer(y ~ TP + (TP|M),data=joe.q) > head(joe.q[,1:5]) TP M AB Trt y 1 1 Jan A NN 19.20002 2 1 Jan A NN 19.06378 3 1 Jan A NN
2005 Oct 10
1
lmer / variance-covariance matrix random effects
Hello, has someone written by chance a function to extract the variance-covariance matrix from a lmer-object? I've noticed the VarCorr function, but it gives unhandy output. Regards, Roel de Jong
2009 Oct 20
2
Interpretation of VarCorr results
Dear all, I'm working with a model to estimate components of variance by using the lme() function. The model is as the following: model=lme(fixed=X~1+as.factor(station),data=myData,na.action=na.exclude,rand om=~N+1|spliceOrHoming) Where X is the response measured variable, station is treated as fixed effects factor, N is a continuous variable, and spliceOrHoming is a (ordered)
2003 Jul 14
1
methods help and glmmPQL
Dear All, I would like to ask you to help me with my memeory. I remember using some function that would list all the possible methods I could apply to an object. Say, if I had an object of class=lme, it would tell me that that I could do stuff like qqnorm(myobjct), or VarCorr(myobject). In general, a very complete list. I though this list of all possible methods would pop out by typing
2011 Jun 08
1
using stimulate(model) for parametric bootstrapping in lmer repeatabilities
Hi all, I am currently doing a consistency analysis using an lmer model and trying to use parametric bootstrapping for the confidence intervals. My model is like this: model<-lmer(y~A+B+(1|C/D)+(1|E),binomial) where E is the individual level for consistency analysis, A-D are other fixed and random effects that I have to control for. Following Nakagawa and Scheilzeth I can work out the
2013 Sep 12
1
Importing packages in Depend
Hi, I am currently preparing a new version of my package papeR. When I run R CMD check using the development version of R I get the following note: Package in Depends field not imported from: ?nlme?, ?lme4?, ?survival? These packages needs to imported from for the case when this namespace is loaded but not attached. I now have problems to fix this issue. It is easy to get rid of two of the
2008 Feb 05
1
Extracting level-1 variance from lmer()
All, How does one extract the level-1 variance from a model fit via lmer()? In the code below the level-2 variance component may be obtained via subscripting, but what about the level-1 variance, viz., the 3.215072 term? (actually this term squared) Didn't see anything in the archives on this. Cheers, David > fm <- lmer( dv ~ time.num*drug + (1 | Patient.new), data=dat.new )
2004 Dec 31
1
lme: Confusion about Variances
Dear R users! I used lme to fit a mixed model with random intercept and spatial Gaussian correlation i.e. I fitted a model of the following form: Y = X*beta + error and error = U + W(t) + Z where U is the random intercept (normally distributed), W(t) the stationary Gaussian process and Z also a normally distributed (the residual) rv. Each of these three random variables have a variance which
2004 Sep 21
2
Bootstrap ICC estimate with nested data
I would appreciate some thoughts on using the bootstrap functions in the library "bootstrap" to estimate confidence intervals of ICC values calculated in lme. In lme, the ICC is calculated as tau/(tau+sigma-squared). So, for instance the ICC in the following example is 0.116: > tmod<-lme(CINISMO~1,random=~1|IDGRUP,data=TDAT) > VarCorr(tmod) IDGRUP = pdLogChol(1)
2001 Nov 14
2
lme: how to extract the variance components?
Dear all, Here is the question: For example, using the "petrol" data offered with R. pet3.lme<-lme(Y~SG+VP+V10+EP,random=~1|No,data=petrol) pet3.lme$sigma gives the residual StdDev. But I can't figure out how to extract the "(intercept) StdDev", although it is in the print out if I do "summary(pet3.lme)". In
2001 Oct 09
1
PROC MIXED user trying to use (n)lme...
Dear R-users Coming from a proc mixed (SAS) background I am trying to get into the use of (n)lme. In this connection, I have some (presumably stupid) questions which I am sure someone out there can answer: 1) With proc mixed it is easy to get a hold on the estimated variance parameters as they can be put out into a SAS data set. How do I do the same with lme-objects? For example, I can see the
2004 Jul 06
2
lme: extract variance estimate
For a Monte Carlo study I need to extract from an lme model the estimated standard deviation of a random effect and store it in a vector. If I do a print() or summary() on the model, the number I need is displayed in the Console [it's the 0.1590195 in the output below] >print(fit) >Linear mixed-effects model fit by maximum likelihood > Data: datag2 > Log-likelihood:
2006 Sep 04
1
Problem with Variance Components (and general glmm confusion)
Dear list, I am having some problems with extracting Variance Components from a random-effects model: I am running a simple random-effects model using lme: model<-lme(y~1,random=~1|groupA/groupB) which returns the output for the StdDev of the Random effects, and model AIC etc as expected. Until yesterday I was using R v. 2.0, and had no problem in calling the variance components of the
2007 Nov 09
1
Confidence Intervals for Random Effect BLUP's
I want to compute confidence intervals for the random effect estimates for each subject. From checking on postings, this is what I cobbled together using Orthodont data.frame as an example. There was some discussion of how to properly access lmer slots and bVar, but I'm not sure I understood. Is the approach shown below correct? Rick B. # Orthodont is from nlme (can't have both nlme and
2007 Jan 02
1
How to extract the variance componets from lme
Here is a piece of code fitting a model to a (part) of a dataset, just for illustration. I can extract the random interaction and the residual variance in group meth==1 using VarCorr, but how do I get the other residual variance? Is there any way to get the other variances in numerical form directly - it seems a litte contraintuitive to use "as.numeric" when extracting estimates,
2006 Jul 28
3
random effects with lmer() and lme(), three random factors
Hi, all, I have a question about random effects model. I am dealing with a three-factor experiment dataset. The response variable y is modeled against three factors: Samples, Operators, and Runs. The experimental design is as follow: 4 samples were randomly chosen from a large pool of test samples. Each of the 4 samples was analyzed by 4 operators, randomly selected from a group of
2010 May 26
1
regresion mixta
Hola a tod en s, estoy trabajando con modelos de regresión mixta con el paquete "nlme", concretamente con la función "lme". Una vez que hago mi modelo y el summary del mismo obtengo por ejemplo la significación (valor p) de la variable independiente, así como el valor del AIC para comparar mi modelo con otro similar, pero no sé cómo obtener un valor del grado de ajuste de la
2003 Feb 13
1
fixed and random effects in lme
Hi All, I would like to ask a question on fixed and random effecti in lme. I am fiddlying around Mick Crawley dataset "rats" : http://www.bio.ic.ac.uk/research/mjcraw/statcomp/data/ The advantage is that most work is already done in Crawley's book (page 361 onwards) so I can check what I am doing. I am tryg to reproduce the nested analysis on page 368:
2006 Jul 11
3
storing the estimates from lmer
Dear all, I'm trying to store/extract the mean& standard error of the fixed effects parameter and the variance of the random effects parameter from "lmer" procedure from mlmre4 package developed by bates n pinheiro. while storing fixed effects parameter is straight forward, the same is not true for storing the variance parameter of the random effects. kindly help me ~prabhu