Displaying 17 results from an estimated 17 matches for "lme3".
Did you mean:
lme
2011 Feb 03
0
Need advises on mixed-effect model ( a concrete example)
...AIC BIC logLik Test L.Ratio p-value
effet.lme 1 8 3696.878 3726.822 -1840.439
effet.lme2 2 14 3705.821 3758.223 -1838.910 1 vs 2 3.056792 0.8017
# Thus I only use the 1st model without interaction term
# try another model adding an acoustic parameter as a fixed effect
result.lme3<-lme(RT~CONDITION+GROUP+ACOUSTQ,data=
meandata,random=~1|SUBJECT, method="ML")
anova(result.lme1,result.lme3) # gives :
Model df AIC BIC logLik Test L.Ratio p-value
effet.lme 1 8 3696.878 3726.822 -1840.439
effet.lme3 2 9 3668.755 3702.442 -1825....
2009 Apr 01
3
How to prevent inclusion of intercept in lme with interaction
...rd,random=~1|subject)
grd$pred0 = predict(grd.lme0,level=0)
summary(grd.lme0)
# Gives true,
all.equal(grd$pred1,grd$pred0)
# Everything as expected without treat
grd.lme2 = lme(newbone~t,data=grd,random=~1|subject)
grd$pred2 = predict(grd.lme2,level=0)
summary(grd.lme2)
# Forced intercept = 0
grd.lme3 = lme(newbone~t-1,data=grd,random=~1|subject)
grd$pred3 = predict(grd.lme3,level=0)
summary(grd.lme3)
# As expected: not equal
all.equal(grd$pred2,grd$pred3)
#-------------------------------------------------------------------
R version 2.9.0 Under development (unstable) (2009-03-13 r48127)
i386-...
2012 Sep 14
1
linear mixed-effects models with two random variables?
...leading minor of order 2 is not positive definite
lme2 <- lme( Biomass ~ fReserve , random = ~1 | Roughness +
DivBoulders ,data=myData) #random
intercept
#Error in getGroups.data.frame(dataMix, groups) :
# Invalid formula for groups
# if I only use one random variable my result is fine!
lme3 <- lme (Biomass ~ fReserve , random= ~ Roughness + DivBoulders
| fReserve , data= myData ) # from help (lme)
summary (lme3)
# I have a result. Is the model correct for what I want?
# BUT my fixed effect (reserve) does not have a p-value due to zero degrees
of freedom. However in glm1 it...
2010 Sep 16
1
Help for an absolutely r-noob
...,"smooth"))
##### (3) MIXED-EFFECTS REGRESSION MODELS #####
library(nlme)
lme1 <- lme(resp ~ amp, dat, ~1|id, method="ML")
lme2 <- lme(resp ~ amp + I(amp^2), dat, ~1|id, method="ML")
lme2a <- lme(resp ~ amp + I(amp^2), dat, ~amp|id, method="ML")
lme3 <- lme(resp ~ amp + I(amp^2) + I(amp^3), dat, ~1|id, method="ML")
lme5 <- lme(resp ~ factor(amp), dat, ~1|id, method="ML")
anova(lme1, lme2)
anova(lme2, lme3, lme5)
summary(lme2)
##### (4) observed vs. predicted data #####
plot(augPred(lme2, ~amp, level=0:1))
xvar...
2003 Apr 08
2
Basic LME
...ndom factor. However, I obtain the same parameter estimate and p value for Age. Please can someone tell me why?
2: When using LME, when I am after a p value for the covariate Age, is it better to do the following;
Model.lme2 <- lme (Weight~Age, random=~ 1|Genotype, method="ML")
Model.lme3 <- lme (Weight~1, random=~ 1|Genotype, method="ML")
Anova(Model.lme2, Model.lme3)
Giving likelihood ratio=0.102, with p=0.749, which is slightly different to the p values of 0.758 above.
Thanks for your attention,
Martin.
Martin Hoyle,
School of Life and Environmental Sciences,
Un...
2007 May 24
4
Function to Sort and test AIC for mixed model lme?
Hi List
I'm running a series of mixed models using lme, and I wonder if there
is a way to sort them by AIC prior to testing using anova
(lme1,lme2,lme3,....lme7) other than by hand.
My current output looks like this.
anova
(lme.T97NULL.ml,lme.T97FULL.ml,lme.T97NOINT.ml,lme.T972way.ml,lme.T97fc.
ml, lme.T97ns.ml, lme.T97min.ml)
Model df AIC BIC logLik Test
L.Ratio p-value
lme.T97NULL.ml 1 3 624.3053 6...
2007 Nov 01
2
F distribution from lme()?
Dear all,
Using the data set and code below, I am interested in modelling how egg
temperature (egg.temp)
is related to energy expenditure (kjday) and clutch size (treat) in
incubating birds using the
lme-function. I wish to generate the F-distribution for my model, and have
tried to do so using
the anova()-function. However, in the resulting anova-table, the parameter
kjday has gone from
being
2008 Jul 14
0
nlme, lme( ) convergence and selection of effects
...15363.96
88.42 7 M 52
Undergraduate PMDB ...
=>Questions:
1) I''ve found that the random effects of the ''state'' level have a very
low standard deviation.
>depfed.lme3<- lme(Votes~Sex, data=depfed.frm, random=~1|State/Party)
>summary (depfed.lme3)
(...)Random effects:
Formula: ~1 | State
(Intercept)
StdDev: 0.0001089504
This suggests that there is no significant advantage on using ''state'' alone
as a grouping factor, I su...
2007 Apr 11
0
Error with corCompSymm and lme fit for repeated measures
...s4 0.5m august NA
70 7 F s4 1.0m august NA
71 7 F s4 2.5m august 10.27613353
72 7 F s4 5.0m august 7.34681883
> lme1 = lme(y ~ M*D*Time, random=~1|Block/M/D/Time, data=PhotoRed, na.action=na.omit)
> lme2 = update(lme1, correlation=corAR1())
> lme3 = update(lme1, correlation=corCompSymm())
Error in corMatrix.corCompSymm(object) : NA/NaN/Inf in foreign function call (arg 1)
> cs = corCompSymm(value=0.5,form=~1|TreeID)
> lme3 = update(lme1, correlation=cs)
Error in lme.formula(fixed = y ~ M * D * Time, data = PhotoRed, random = ~1 | :...
2009 Dec 11
0
Calculation of slope for Poisson regression
...int count stations within a stand
(~150 stations) visited twice a year and with multiple observers. I am using
a linear mixed effects model (lme4) that includes year as a fixed effect and
observer, station nested within stand (to account for spatial
auto-correlation) and visit as random variables:
lme3<-lmer(Abundance ~ Year + (1|Site/Station)+ (1|Observer)+ (1|Visit),
data=AMRE, family = poisson(link=log))
To test the model, I simulated a data set (Poisson distribution) with a 50%
decline over 50 years (with a mean abundance at year 1 of 10 individuals of
species X).
The parameter estimates...
2004 Jul 23
2
confidence intervals for linear combinations when using lme
..."contrast" or "estimate" or
"lsmeans" in SAS). I have now found out that the vcov-function in the
lme4-package could be of great help for me, but I do not know if I can use
lme4 when working with S-PLUS 6.1, or is it only for R.
When I write
>library(MASS)
I find lme3, where there is a vcov-function, but if I understand it
correctly it works with lm and not with lme...
If I can use lme4 with s-plus 6.1, what shall I do in order to install it on
my computer?
I am grateful for all help I can get?
best regards
Anna Persson
1999 May 10
2
linear mixed models (PR#188)
in lmList ,lmList.formula and lmList.groupedData functions in help pages there is an argument called "groups" that doesn't exist in the code of the functions.
<<insert bug report here>>
--please do not edit the information below--
Version:
platform = i686-unknown-linux
arch = i686
os = linux
system = i686, linux
status = Patched (unreleased snapshot)
status.rev
2017 Nov 15
1
error message for function: lmer (from lme4 package)
Always cc the list, which I have done here. I am not a (free) private
consultant, nor do I have all the answers.
Based on what you sent me, which is not what you have previously posted,
you failed to load the lme3 package. See ?library.
As for the appropriateness of your modeling, you should do what David
already suggested and post to the r-sig-mixed-models list instead.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
--...
2004 Aug 10
4
Enduring LME confusion… or Psychologists and Mixed-Effects
...e(resp~fact1*fact2, random=~1|subj/fact1/fact2)
But this is not a correct model because it assumes the factors to be
hierarchically ordered, which they are not.
Another alternative is to model the random effect using a matrix, as
seen in "[R] lme and mixed effects" on this list.
> lme3 <- (resp~fact1*fact2, random=list(subj=pdIdent(form=~fact1-1),
subj=~1, fact2=~1)
This provides 'correct? degrees of freedom for fact1, but not for the
other effects and I must confess that I don't understand this use of
matrices, I?m not a statistician.
My questions thus come dow...
2017 Nov 16
0
error message for function: lmer (from lme4 package)
...day, November 15, 2017 10:44 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
Always cc the list, which I have done here. I am not a (free) private consultant, nor do I have all the answers.
Based on what you sent me, which is not what you have previously posted, you failed to load the lme3 package. See ?library.
As for the appropriateness of your modeling, you should do what David already suggested and post to the r-sig-mixed-models list instead.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and sticking things into it."
--...
2010 Sep 24
7
help
Estimados
Escribo para consultar sobre el uso de modelos mixtos anidados. Los
datos que estoy analizando provienen de censos de malezas en cuatro
tipos de paisajes de la región pampeana, en los que seleccioné al azar
igual número de lotes agrícolas cultivados con tres cultivos (maíz,
soja y trigo-soja). En cada lote censé el número de especies de
malezas en tres posiciones: el alambrado, el borde
2004 Aug 11
1
Fwd: Enduring LME confusion… or Psychologists and Mixed-Effects
...;> But this is not a correct model because it assumes the factors to be
>> hierarchically ordered, which they are not.
>>
>> Another alternative is to model the random effect using a matrix, as
>> seen in "[R] lme and mixed effects" on this list.
>> > lme3 <- (resp~fact1*fact2, random=list(subj=pdIdent(form=~fact1-1),
>> subj=~1, fact2=~1)
>>
>> This provides 'correct? degrees of freedom for fact1, but not for the
>> other effects and I must confess that I don't understand this use of
>> matrices, I?m not...