Displaying 20 results from an estimated 10000 matches similar to: "A question on lme in R"
2010 Dec 01
1
[R-lme] Extract estimated variances from output of lme?
Hi all,
I have the output of summary() of an lme object called "lme.exp1", for
example
#############################################
> summary(lme.exp1)
Linear mixed-effects model fit by REML
Data: DATA
Log-restricted-likelihood: -430.8981
Fixed: fixed.exp1
....
Random effects:
Formula: ~-1 + mu1 + log.sig1 | animID
Structure: Diagonal
mu1 log.sig1
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
2006 Feb 09
1
effect sizes in lme/ multi-level models
Dear alltogether,
I am searching for a way to determine "effect size" in multi-level
models by using lme().
Coming from Psychology, for ordinary OLS there are measures (for
meta-analysis, etc.) like
CohensD <- (mean_EG - mean_CG) / SD_pooled
or
(p)eta^2 <- SS_effect / (SS_effect + SS_error)
I do not intend to lead a discussion of the usefulness of such measures
as long as
2007 Apr 06
2
plotting multilevel / lme lines
Dear expeRts,
I am trying to plot a lme-object {package nlme) in such a way, that
on a selected level the x-axis represents the value on a selected
predictor and the y-axis represents the predicted-outcome variable.
The graphs would than consist of several lines that each represent
one group. I can't find such a plotting function.
I could write such a function myself, based on
2015 Feb 15
2
Imports problem
I'm testing out a new version of coxme and R CMD check fails with "could not find function
ranef" (or random.effects or fixef, or anything from nlme). The NAMESPACE file has the
line below
importFrom(nlme, ranef, random.effects, fixef, fixed.effects, VarCorr)
and nlme is declared in the DESCRIPTION file as an import. I feel that I must be staring
at some obvious (but
2007 Oct 15
2
coef se in lme
Hi all!
How is it possible to estimate standard errors for coef obtained from lme?
Is there sth like se.coef() for lmer or what is the anaytical solution?
Thank you!
2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users
I am relatively new to R, i hope my many novice questions are welcome.
I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme.
I used the following models:
yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+
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,
2015 Feb 16
2
Imports problem
On 16/02/2015 8:20 AM, Therneau, Terry M., Ph.D. wrote:
>
>> > I'm testing out a new version of coxme and R CMD check fails with "could not find function
>> > ranef" (or random.effects or fixef, or anything from nlme). The NAMESPACE file has the
>> > line below
>>
>> > importFrom(nlme, ranef, random.effects, fixef,
2009 Apr 23
1
qqnorm.lme & pairs.lme
Hello,
I am trying to do some plotting to check random effect assumptions for a
model I fit using lme.
I want to use qqnorm and pairs (similarly to examples given in Pinheiro &
Bates p. 188), but it's not working. Here's some relevant code and the
error message:
library(nlme)
data(Machines)
m1 <- lme(fixed=score~Machine,random=~1|Worker/Machine, data=Machines)
qqnorm(m1,
2006 Sep 07
2
Matrix package in R-2.4.0alpha
In a newly downloaded version (today) of R-2-4-0alpha, with all packages
from CRAN also installed today, I get:
> library(Matrix)
Erro en loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source) :
in 'Matrix' methods specified for export, but none defined: BIC,
anova, coef, confint, deviance, fitted, fixef, formula, head, lmer, logLik,
mcmcsamp, plot,
2005 Mar 26
1
lme: random effects of a quadratic term
Hello,
I am estimating the following model:
so2.lme<-lme(so2~1+I(alcadakm^2)+dia,data=subjectes2,na.action=na.omit)
And when I try to plot the random effects of the quadratic term with
respect to a covariate (mam) I get an error:
> so2.lmeRE<-ranef(so2.lme,augFrame=T)
> plot(so2.lmeRE,form=I(alcadakm^2)~mam)
Error in plot.ranef.lme(so2.lmeRE, form = I(alcadakm^2) ~ mam ) :
Only
2003 May 12
1
plot.ranef.lme (PR#2986)
library(nlme)
data(Phenobarb)
na.include <- function(x)x
phe1 <- nlme(conc~phenoModel(Subject, time, dose, lCl, lV),
data = Phenobarb,
fixed = lCl+lV~1,
random= pdDiag(lCl+lV~1),
start = c(-5,0),
na.action = na.include,
naPattern = ~!is.na(conc))
phe.ranef <- ranef(phe1,augFrame=TRUE)
plot(phe.ranef, form=lCl~Wt+ApgarInd)
[Error in max(length(x0),
2006 Oct 04
1
extracting nested variances from lme4 model
I have a model:
mod1<-lmer( x ~ (1|rtr)+ trth/(1|cs) , data=dtf) #
Here, cs and rtr are crossed random effects.
cs 1-5 are of type TRUE, cs 6-10 are of type FALSE,
so cs is nested in trth, which is fixed.
So for cs I should get a fit for 1-5 and 6-10.
This appears to be the case from the random effects:
> mean( ranef(mod1)$cs[[1]][1:5] )
[1] -2.498002e-16
> var(
2006 Mar 29
1
lmer multilevel
My question relates to problems that I'm having matching lme and lmer
examples in P&B.
using Matix 0.995
In the Oxide example in p167-170 I can't get the level 2 coefficient
estimates to match
the fm1Oxide model in lme is
data(Oxide,package="nlme")
lme(Thickness~1,Oxide)
which I translate in Lmer syntax to
fm3Oxide<-lmer(Thickness~
2006 Jul 15
3
names() function and lmer()
Hello All,
I would like to retrieve some of the results from the lmer(...)
function in library lme4. If I run a model, say
fm.1 <- lmer(y ~ 1 + (1 | x), data = dog)
and try names(fm.1), I get NULL. Is there anyway to retrieve the information?
Thanks
2007 Sep 26
1
Accessing the fixed- and random-effects variance-covariance matrices of an nlme model
I would appreciate confirmation that the function vcov(model.nlme)
gives the var-cov matrix of the fixed effects in an nlme model.
Presumably the random-effects var-cov matrix is given by cov(ranef
(model.nlme)?
Rob Forsyth
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
2011 Dec 30
0
New version of coxme / lmekin
Version 2.2 of coxme has been posted to CRAN, Windows versions and
mirrors should appear in due course. This is a major update with three
features of note:
1. A non-upwardly compatable change:
Extractor functions: beta= fixed effects, b=random effects
nlme lme4 coxme <2.2 coxme 2.2 lmekin 2.2
------------------------------------------------------
beta
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