Displaying 20 results from an estimated 20000 matches similar to: "Linear Mixed Effects"
2007 Oct 24
1
is there a similar function to perform repeated statements as in SAS PROC MIXED?
PROC MIXED is used to fit mixed effects model for correlated data.
Usually we can use either a REPEATED statment or a RANDOM statement.
The random statement is corresponding to lme function in R -- specifying a
random effect term.
The repeated statement actually directly specifies the covariance structure
-- is there a similar function in R to do this? I currently want to specify
a unstructured
2006 Jun 28
1
lme - Random Effects Struture
Thanks for the help Dimitris,
However I still have a question, this time I'll be more specific,
the following is my SAS code
proc mixed data=Reg;
class ID;
model y=Time Time*x1 Time*x2 Time*x3 /S;
random intercept Time /S type=UN subject=ID G GCORR V;
repeated /subject = ID R RCORR;
run; **
(Type =UN for random effects)
The eqivalent lme statement I
2005 Mar 28
1
mixed model question
I am trying to fit a linear mixed model of the form
y_ij = X_ij \beta + delta_i + e_ij
where e_ij ~N(0,s^2_ij) with s_ij known
and delta_i~N(0,tau^2)
I looked at the ecme routine in package:pan, but this routine
does not allow for different Vi (variance covariance matrix of
the e_i vector) matrices for each cluster.
Is there an easy way to fit this model in R or should I bite the
bullet and
2005 May 04
1
lme versus proc mixed in SAS
Dear all,
I am trying to simulate the null distribution for the likelihood ratio
test statistic for testing 1 random effect versus no random effect. The
asymptotic null distribution should be a mixture of a chi-squared
distribution with 0 degrees of freedom and a chi-squared distribution
with 1 degree of freedom. This means that I expect a point mass of 50%
on 0 for the likelihood ratio
2007 Apr 11
2
negative variances
Dear R experts,
I had a question which may not be directly relevant to R but I will be
grateful if you can give me some advices.
I ran a two-level multilevel model for data with repeated measurements over
time, i.e. level-1 the repeated measures and level-2 subjects. I could not
get convergence using lme(), so I tried MLwiN, which eventually showed the
level-2 variances (random effects for
2005 Feb 15
1
shrinkage estimates in lme
Hello. Slope estimates in lme are shrinkage estimates which pull the
OLS slope estimates towards the population estimates, the degree of
which depends on the group sample size and the distance between the
group-based estimate and the overall population estimate. Although
these shrinkage estimates as said to be more precise with respect to the
true values, they are also biased. So there is a
2004 Sep 21
1
lme RE variance computation
As I understand it lme (in R v1.9.x) estimates random effect variances
on a log scale, constraining them to be positive. Whilst this seems
sensible, it does lead to apparently biased estimates if the variance is
actually zero - which makes our simulation results look strange. Whilst
we need to think a bit deeper about it - I still haven't got my head
around what a negative variance could
2005 Feb 02
3
publishing random effects from lme
Dear all,
Suppose I have a linear mixed-effects model (from the package nlme) with
nested random effects (see below); how would I present the results from
the random effects part in a publication?
Specifically, I?d like to know:
(1) What is the total variance of the random effects at each level?
(2) How can I test the significance of the variance components?
(3) Is there something like an
2006 Feb 15
1
repeated measurements and lme
I am trying to do a repeated measurement anova using an lme. I have the
following variables:
-ID, the identification of the individual
-trail, with 2 levels
-treatment, with 3
-time, measure 5 times the same individual
-VCL, the response variable
I tried the following in R,
within.gr<-groupedData(VCL~time|ID/treatment/time,data=within)
2006 Aug 09
1
nested ANOVA using lme
I have an ANOVA model with 2 factors "Environment" and "Site",
"Diameter" is the response variable. Site should be nested within
Environment. Site is also a random factor while Environment is fixed. I
can do this analysis using the "aov" function by using these commands:
>model<-aov(Diam~Env+Error(Env%in%Site),data=environ)
>summary(model)
2005 Jun 21
1
Another Mix Model Question
Hi again,
thank you for your previous answers. Just another question, though ...
I get the following variance components after fitting a mixed model.
Groups Name Variance Std.Dev. Corr
PlantID TreatmCtrl 0.51784 0.71961
TreatmNoAccess 4.77469 2.18511 -0.063
TreatmNoKeel 4.22726 2.05603 0.513 0.751
TreatmNoSpur 0.45918
2012 Jul 06
2
Mixed Models providing a correlation structure.
Hi folks,
I was wondering how to run a mixed models approach to analyze a linear
regression with a user-defined covariance structure.
I have my model
y = xa +zb +e and
b ~ N (0, C*sigma_square). (and a is a fixed effects)
I would like to provide R the C (variance-covariance) matrix
I can easily provide an example, but at this point I am first trying to know
what is the best package the
2008 Jan 03
2
confidence interval too small in nlme?
Hello,
I am interested in using nlme to model repeated measurements, but I don't seem
to get good CIs.
With the code below I tried to generate data sets according to the model given
by equations (1.4) and (1.5) on pages 7 and 8 of Pinheiro and Bates 2000 (having
chosen values for beta, sigma.b and sigma similar to those estimated in the
text).
For each data set I used lme() to fit a model,
2004 Dec 14
1
correlation in lme4
Dear all,
I have tried to consider a correlation structure in lme (package lme4), but
without success.
I have used something like:
> risul<-lme(y~x+ z , data=mydata, random=~ x | g, correlation = corAR1())
but the result is the same as:
> risul<-lme(y~x+ z , data=mydata, random=~ x | g).
Can anybody help me?
Antonella
**************************************************
Prof.
2005 Apr 14
1
lme, corARMA and large data sets
I am currently trying to get a "lme" analyses running to correct for the
non-independence of residuals (using e.g. corAR1, corARMA) for a larger data
set (>10000 obs) for an independent (lgeodisE) and dependent variable
(gendis). Previous attempts using SAS failed. In addition we were told by
SAS that our data set was too large to be handled by this procedure anyway
(!!).
SAS script
2004 Aug 26
5
GLMM
I am trying to use the LME package to run a multilevel logistic model
using the following code:
------------------------------------------------------------------------
-------------------------------------------
Model1 = GLMM(WEAP ~ TSRAT2 , random = ~1 | GROUP , family = binomial,
na.action = na.omit )
------------------------------------------------------------------------
2005 Jan 05
2
lme: error message with random=~1
Hello,
I have an unbalanced mixed model design with two fixed effects
"site" (2 levels) and "timeOfDay" (4 levels) and two random effects
"day" (3 consecutive days) and "trap" (6 unique traps, 3 per site).
The dependent variable is the body length ("BL") of insect larvae from 7
to 29 individuals per trap (104 individuals in total).
To account
2004 Nov 17
4
summary.lme() vs. anova.lme()
Dear R list:
I modelled changes in a variable (mconc) over time (d) for individuals
(replicate) given one of three treatments (treatment) using:
mconc.lme <- lme(mconc~treatment*poly(d,2), random=~poly(d,2)|replicate,
data=my.data)
summary(mconc.lme) shows that the linear coefficient of one of the
treatments is significantly different to zero, viz.
Value Std.Error
2004 Jul 16
1
Fixed and random factors in aov()
Hi,
I'm confused about how to specify random and fixed factors in an aov()
term. I tried to reproduce a textbook example: One fixed factor (Game, 4
levels) and one random factor (Store, 12 levels), response is Points.
The random factor Store is nested in Game. I tried
> str(kh.df)
`data.frame': 48 obs. of 4 variables:
$ Subj : Factor w/ 48 levels
2011 Jul 25
2
Wide confidence intervals or Error message in a mixed effects model (nlme)
I am analyzing a dataset on the effects of six pesticides on population
growth rate of a predatory mite. The response variable is the population
growth rate of the mite (ranges from negative to positive) and the
exploratory variable is a categorical variable (treatment). The
experiment was blocked in time (3 blocks / replicates per block) and it
is unbalanced - at least 1 replicate per block. I am