Displaying 20 results from an estimated 122 matches for "numdf".
2004 Nov 25
1
Error in anova(): objects must inherit from classes
...e ~ day + stereotypy,
+ random = ~ 1 | bear, data = learning, family = binomial)
> fm2 <- glmmPQL(choice ~ day + envir + stereotypy,
+ random = ~ 1 | bear, data = learning, family = binomial)
Individually, I get results from anova():
> anova(fm1)
numDF denDF F-value p-value
(Intercept) 1 2032 7.95709 0.0048
day 1 2032 213.98391 <.0001
stereotypy 1 2032 0.42810 0.5130
>
> anova(fm2)
numDF denDF F-value p-value
(Intercept) 1 2031 5.70343 0.0170
day 1 2031 213.21673 <.0...
2012 Feb 14
2
how to test the random factor effect in lme
Hi
I am working on a Nested one-way ANOVA. I don't know how to implement
R code to test the significance of the random factor
My R code so far can only test the fixed factor :
anova(lme(PCB~Area,random=~1|Sites, data = PCBdata))
numDF denDF F-value p-value
(Intercept) 1 12 1841.7845 <.0001
Area 1 4 4.9846 0.0894
Here is my data and my hand calculation.
> PCBdata
Area Sites PCB
1 A 1 18
2 A 1 16
3 A 1 16
4 A 2 19
5 A 2 20
6 A 2 19
7...
2003 Apr 09
1
[OFF] Nested or not nested, this is the question.
...ation
in a nested design, OK?
I need to know:
the species are different in proportion?
the size affect the species's proportion?
existe interaction between size and species?
I make the analysis.
> m.lme <- lme(nsp/tot~size*specie,random=~1|size/specie)
> anova(m.lme)
numDF denDF F-value p-value
(Intercept) 1 16 374.7121 <.0001
size 1 2 37.8683 0.0254
specie 1 2 18.2036 0.0508
size:specie 1 2 9.3203 0.0926
>
This is the correct mean to make this analysis?
or
> m.lme <- lme(nsp/tot~size*specie,random=~...
2005 Mar 09
1
multiple comparisons for lme using multcomp
...655
> #a friend told me that it is possible to do multiple comparisons for lme
in a simplest way, i.e. :
> anova(lm1,L=c("treatmentcontrol"=1,"treatmentAl200"=-1))
F-test for linear combination(s)
treatmentAl200 treatmentcontrol
-1 1
numDF denDF F-value p-value
1 1 12 2.538813 0.1371
> anova(lm1,L=c("treatmentcontrol"=1,"treatmentAl400"=-1))
F-test for linear combination(s)
treatmentAl400 treatmentcontrol
-1 1
numDF denDF F-value p-value
1 1 12 17.30181 0....
2006 Feb 23
2
Strange p-level for the fixed effect with lme function
...ing Subjects within Experiments, but it is
expected to have much slower RT (reaction time) in the second
experiment, since the task is more complex, so it would not make much
sense. That is why I kept analyses separated:
(A) lme(RT ~ F2 + MI, random =~ 1 | Subject, data = exp1)
ANOVA:
numDF denDF F-value p-value
(Intercept) 1 1379 243012.61 <.0001
F2 1 1379 47.55 <.0001
MI 1 1379 4.69 0.0305
Fixed effects: RT ~ F2 + MI
Value Std.Error DF t-value p-value
(Intercept) 6.430962 0.03843484 1379 167.32118 0.0000
F2...
2009 Apr 05
4
extract the p value of F statistics from the lm class
..."terms" "residuals"
[4] "coefficients" "aliased" "sigma"
[7] "df" "r.squared" "adj.r.squared"
[10] "fstatistic" "cov.unscaled"
x$fstatistic
value numdf dendf
72.04064 1.00000 31.00000
But can not find the p value of F statistics.
Thanks
Ted
--
View this message in context: http://www.nabble.com/extract-the-p-value-of-F-statistics-from-the-lm-class-tp22891475p22891475.html
Sent from the R help mailing list archive at Nabble.com.
2004 Nov 26
1
help with glmmPQL
...day + stereotypy,
+ random = ~ 1 | bear, data = learning, family = binomial)
> fm2 <- glmmPQL(choice ~ day + envir + stereotypy,
+ random = ~ 1 | bear, data = learning, family = binomial)
Individually, I get results from anova():
> anova(fm1)
numDF denDF F-value p-value
(Intercept) 1 2032 7.95709 0.0048
day 1 2032 213.98391 <.0001
stereotypy 1 2032 0.42810 0.5130
>
> anova(fm2)
numDF denDF F-value p-value
(Intercept) 1 2031 5.70343 0.0170
day 1 2031 213.21673 <....
2007 Nov 01
2
F distribution from lme()?
...Value Std.Error DF t-value p-value
(Intercept) 24.937897 6.662475 11 3.743038 0.0032
kjday 0.108143 0.152540 7 0.708945 0.5013
treat3 -1.506605 0.485336 7 -3.104254 0.0172
#generating an anova table to get the F-distribution
> anova(incub.lme2)
numDF denDF F-value p-value
(Intercept) 1 11 1176.6686 <.0001
kjday 1 7 5.7060 0.0483
treat 1 7 9.6364 0.0172
>
--
View this message in context: http://www.nabble.com/F-distribution-from-lme%28%29--tf4729757.html#a13524346
Sent from the R help mailing...
2004 Aug 27
2
degrees of freedom (lme4 and nlme)
...ackages
lme4 and nlme, more specifically in the denominator
degrees of freedom. I used data Orthodont for the two
packages. The commands used are below.
require(nlme)
data(Orthodont)
fm1<-lme(distance~age+ Sex,
data=Orthodont,random=~1|Subject, method="REML")
anova(fm1)
numDF DenDF F-value p-value
(Intercept) 1 80 4123.156 <.0001
age 1 80 114.838 <.0001
Sex 1 25 9.292 0.0054
The DenDF for each fixed effect is 80, 80 and 25.
Using the package lme4:
require(lme4)
data(Orthodont)
fm2<-lme(distance~age+...
2003 Jul 27
2
continuous independent variable in lme
...controls for the two other lines so I have set the
following contrasts for lines:
[,1] [,2] [,3]
18 1 0 1
25 -1 0 1
l 0 1 -1
s 0 -1 -1
If I do the following:
mod1<-lme(area ~ line * temp, random = ~1|replicate/temp, mydata)
anova(mod1)
I get:
numDF denDF F-value p-value
(Intercept) 1 336 41817.83 <.0001
line 3 8 14.38 0.0014
temp 1 8 338.21 <.0001
line:temp 3 8 0.62 0.6211
I have a significant effect of selection line. Eyeballing the
interction.plot, it is clear the the line...
2007 Jul 25
0
DF and intercept term meaning for mixed (lme) models
Hi,
I am using the lme package to fit mixed effects models to a set of data.
I am having a difficult time understanding the *meaning* of the numDF (degrees
of freedom in the numerator), denDF (DF in the denomenator), as well as the
Intercept term in the output.
For example:
I have a groupedData object called 'Soil', and am fitting an lme model as
follows:
## fit a simple model
# errors partitioned among replicates
fit1 <- lme...
2007 Oct 31
0
set initial parameter values for GLMM estimation
...icted scores (no error)
proc mixed data = dataSet;
class treat group;
model y = treat*time ;
random intercept / subject=group(treat);
PARMS (2.1) (1.2) / NOITER;
contrast 'slopes' treat*time 1 -1 0,treat*time 1 0 -1;
ods output contrasts=c;
run;
data dataSet;
set c;
alpha=0.05;
ncparm=numdf*fvalue;
fc=finv(1-alpha,numdf,dendf,0);
power=1-probf(fc,numdf,dendf,ncparm);
run;
proc print;run;
cheers,
Wilfried
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
2005 Jan 03
1
different DF in package nlme and lme4
Hi all
I tried to reproduce an example with lme and used the Orthodont
dataset.
library(nlme)
fm2a.1 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1 | Subject)
anova(fm2a.1)
> numDF denDF F-value p-value
> (Intercept) 1 80 4123.156 <.0001
> age 1 80 114.838 <.0001
> Sex 1 25 9.292 0.0054
or alternatively (to get the same result)
fm2a.2 <- lme(distance ~ age + Sex, data = Orthodont, random = list(Subject = ~ 1))
a...
2007 Jun 25
1
degrees of freedom in lme
...7.63 20.576 0.0002855 ***
Residuals 10 426.53 42.65
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 36 33.287 0.925
> anova(lme(fixed=score~Machine,random=~1|Worker/Machine,data=Machines))
numDF denDF F-value p-value
(Intercept) 1 36 773.5709 <.0001
Machine 2 10 20.5762 3e-04
No problem here: the results are essentially the same, which is expected. Now
I turn to an ANCOVA with a random grouping factor.
> data(Orthodont)
> OrthoFem <- Orthodont[Orthod...
2008 Feb 26
2
AIC and anova, lme
...0.554146 0.43
The usual conclusion would be that the two models are equivalent and to
keep the null model for parsimony (!).
However, an anova shows that the variable 'log(1e-04 + transat)' is
significantly different from 0 in model 2 (lmmedt9)
> anova(lmmedt9)
numDF denDF F-value p-value
(Intercept) 1 20 289.43109 <.0001
log(1e-04 + transat) 1 20 31.18446 <.0001
Has anyone an opinion about what looks like a paradox here ?
Patrick
2005 Jul 18
1
Nested ANOVA with a random nested factor (how to use the lme function?)
...siduals 40 881875 22047
I have tried the following lme function to specify that Site is random:
> lme1 <- lme(sp~Location, random=~1|Site, data=mavric)
> lme2 <- lme(sp~Location, random=~1|Location/Site, data=mavric)
> anova(lme1)
numDF denDF F-value p-value
(Intercept) 1 40 3.418077 0.0719
Location 4 5 1.152505 0.4294
This gives me the correct F-value for Location from
MSLocation/MSLocation:Transect, but the p-value doesn't seem to be
correct (by my calculations in Microsoft Excel it should be 0.345...
2006 Sep 07
5
Conservative "ANOVA tables" in lmer
...- I start by assuming that the appropriate denominator degrees lies
between n - p and and n - q, where n=number of observations, p=number
of fixed effects (rank of model matrix X), and q=rank of Z:X.
- I then conclude that good estimates of P values on the F ratios lie
between 1 - pf(F.ratio, numDF, n-p) and 1 - pf(F.ratio, numDF, n-q).
- I further surmise that the latter of these (1 - pf(F.ratio, numDF,
n-q)) is the more conservative estimate.
When I use these criteria and compare my "ANOVA" table to the results
of analysis of Helmert contrasts using MCMC sample with highest...
2005 Apr 12
1
lme problem
...24 0.19
0.848
bstime:typeSnow Cap 0.9 0.4 24 2.25
0.034
However in Milliken & Johnson all df are 23. Values (estimates) are almost
identical, but there are some small differences in SE and t.
Using
anova(LME.1)
I obtain
numDF denDF F-value p-value
type 6 0 18.19 NaN
bstime:type 6 24 4.04 0.0061
but in the book it is:
numDF denDF F-value p-value
type...
2019 Jan 17
3
long-standing documentation bug in ?anova.lme
...says:
When only one fitted model object is present, a data frame with
the sums of squares, numerator degrees of freedom, denominator
degrees of freedom, F-values, and P-values
The output of
fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
anova(fm1)
gives columns
numDF denDF F-value p-value
-- i.e. the sums of squares aren't there! (For fairly good reasons; lme
doesn't actually compute them internally, and it might not always be
straightforward to compute them, for more complex models. They would
mostly be useful for comparison with simpler, method-of...
2009 Jan 12
1
help on nested mixed effects ANOVA
...e to use.
I also have some missing values as NA as part of the dataset. I have
also set Subj, Region, and Call as factors using as.factor.
I have run the model which I am sure is wrong:
model1<-anova(lme(egr ~ Trt* Region, random=~1|Subj/Region,na.action=na.omit))
The output I am getting is:
numDF denDF F-value p-value
Min. : 1.00 Min. : 32 Min. : 2.891 Min. :0.000e+00
1st Qu.: 1.75 1st Qu.:197 1st Qu.: 12.120 1st Qu.:0.000e+00
Median : 6.50 Median :252 Median : 20.275 Median :1.146e-05
Mean : 9.00 Mean :197 Mean : 87.353...