Displaying 20 results from an estimated 11000 matches similar to: "ANCOVA with random factor"
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)
2002 Oct 31
7
Symbols for male/female
Dear all,
I would like to use the biological symbols for male and female as plotting
symbols in a scatterplot (ideally filled and non-filled). R does not seem
to have these symbols using pch= in plot() nor are they implemented via
expression() or at least I did not find them. I found that the symbols are
e.g. available in the wasysym and the marvosym package in LaTeX.
I have coded two very rough
2002 Oct 31
7
Symbols for male/female
Dear all,
I would like to use the biological symbols for male and female as plotting
symbols in a scatterplot (ideally filled and non-filled). R does not seem
to have these symbols using pch= in plot() nor are they implemented via
expression() or at least I did not find them. I found that the symbols are
e.g. available in the wasysym and the marvosym package in LaTeX.
I have coded two very rough
2002 Sep 30
2
Decompose numerical factor into orthog. poly parts
Consider the following analysis of a class experiment done as a Latin Square:
> spinner <- gl(4,4,16,label=c("Murray","Angela","Shasha","Stephen"))
> order <- gl(4,1,16)
> treat <- scan()
1: 1 2 4 3
5: 4 3 1 2
9: 3 4 2 1
13: 2 1 3 4
17:
Read 16 items
> coin <-
2007 Nov 15
3
Ancova doesn't return test statistics
Dear all,
I'm quite sure that this is a stupid question, but I'll ask anyway.
I want to perform an ANCOVA with two continuous factors and three
categorical factors.
Plant population growth rate (GR) = dependent variable
Seed reduction due to herbivory (SR) = continuous explanatory variable
Herbivore species (HS, 2 levels) = categorical explanatory variable
Population (Pop, 24 levels) =
2012 Feb 12
2
ANCOVA post-hoc test
Could you please help me on the following ANCOVA issue?
This is a part of my dataset:
sampling dist h
1 wi 200 0.8687212
2 wi 200 0.8812909
3 wi 200 0.8267464
4 wi 0 0.8554508
5 wi 0 0.9506721
6 wi 0 0.8112781
7 wi 400 0.8687212
8 wi 400 0.8414646
9 wi 400 0.7601675
10 wi 900 0.6577048
11 wi 900
2006 Jan 26
1
[R-SIG-Mac] Hist for different levels of a factor
The list of your interest is R-help not R-sig-mac
stefano
Il giorno 26/gen/06, alle ore 01:20, Sylvain Charlat ha scritto:
> Hi,
>
> Is there any simple way to get histogram for different levels of
> factor?
>
> Say you have the following data set:
>
> Island Sp.diam
> Moorea 1.21
> Moorea 1.27
> Moorea 1.28
> Moorea 1.22
> Moorea 1.28
> Rurutu
2006 Jun 02
1
ANCOVA in S-plus/R?
Dear R user:
I have a question about doing ANCOVA in S-plus or R.
I know that many users use lm to do the regression and check the ANCOVA. But is there a way to get the traditional Table form of the ANCOVA test through S-plus (like what we would get from SPSS or SAS)?
The problem I’m interested in is whether or not there is a treatment effect on some medical measurement. I will
2016 Apr 03
1
apply mean function to a subset of data
Here are several ways to get there, but your original loop is fine once it is corrected:
> for (i in 1:2) smean[i] <- mean(toy$diam[toy$group==i][1:nsel[i]])
> smean
[1] 0.271489 1.117015
Using sapply() to hide the loop:
> smean <- sapply(1:2, function(x) mean((toy$diam[toy$group==x])[1:nsel[x]]))
> smean
[1] 0.271489 1.117015
Or use head()
> smean <- sapply(1:2,
2010 Oct 03
1
scatterplot error message
Hi All. I am a new R user. Trying to do scatterplot. Not sure how to
resolve this error message
A<-subset (ErablesGatineau, station=="A")
> B<-subset (ErablesGatineau, station=="B")
>
> plot(diam ~ biom)
> abline(lm(diam ~ biom), col = "red")
>
> goodcases <- !(is.na(diam) | is.na(biom))
> lines(lowess(diam[goodcases] ~
2016 Apr 02
0
apply mean function to a subset of data
Hi Pedro,
This may not be much of an improvement, but it was a challenge.
selvec<-as.vector(matrix(c(nsel,unlist(by(toy$diam,toy$group,length))-nsel),
ncol=2,byrow=TRUE))
TFvec<-rep(c(TRUE,FALSE),length.out=length(selvec))
toynsel<-rep(TFvec,selvec)
by(toy[toynsel,]$diam,toy[toynsel,]$group,mean)
Jim
On 4/3/16, Pedro Mardones <mardones.p at gmail.com> wrote:
> Dear all;
>
2009 Oct 23
3
opposite estimates from zeroinfl() and hurdle()
Dear all,
A question related to the following has been asked on R-help before, but
I could not find any answer to it. Input will be much appreciated.
I got an unexpected sign of the "slope" parameter associated with a
covariate (diam) using zeroinfl(). It led me to compare the estimates
given by zeroinfl() and hurdle():
The (significant) negative estimate here is surprising, given
2012 Jul 04
2
Difference between two-way ANOVA and (two-way) ANCOVA
Hi!
as my subject says I am struggling with the different of a two-way ANOVA and
a (two-way) ANCOVA.
I found the following examples from this webpage:
http://www.statmethods.net/stats/anova.html
# One Way Anova (Completely Randomized Design)
fit <- aov(y ~ A, data=mydataframe)
# Randomized Block Design (B is the blocking factor)
fit <- aov(y ~ A + B, data=mydataframe)
# Two Way
2006 Aug 22
2
how to run ANCOVA?
Dear all,
I would like to know how to run an analysis of covariance in R. For
example, I have a data frame ("data") consisting of two second-degree
categorical variables ("diagnosis" and "gender"), one continous
independent variable ("age") and one continous dependent variable
("response").
I ran a simple anova to see the effects of diagnosis
2007 Jan 09
2
posthoc tests with ANCOVA
dear all,
I want to perform a posthoc test for my ANCOVA:
a1<-aov(seeds~treatment*length)
With
summary(glht(a1, linfct = mcp(treatment = "Tukey")))
R tells me: "covariate interactions found -- please choose appropriate
contrast"
How do I build these contrasts?
Ideally, I would like to have the posthoc test for the ANCOVA including
a block-effect
2011 Dec 11
2
multiple comparison of interaction of ANCOVA
Hi there,
The following data is obtained from a long-term experiments.
> mydata <- read.table(textConnection("
+ y year Trt
+ 9.37 1993 A
+ 8.21 1995 A
+ 8.11 1999 A
+ 7.22 2007 A
+ 7.81 2010 A
+ 10.85 1993 B
+ 12.83 1995 B
+ 13.21 1999 B
+ 13.70 2007 B
+ 15.15 2010 B
+ 5.69 1993 C
+ 5.76 1995 C
+ 6.39 1999
2009 Aug 20
1
ANCOVA with defined error terms
I am trying to run an ANCOVA with defined error terms. Thus I have to use
AOV and not lm.
my response variable is proportion of mice paw prints on track plates. These
plates were placed on plots that had vegetation and fruit manipulated to two
levels each (present or absent), and were sampled monthly for 14 months
(repeated measures). The fully crossed factor design was also blocked. My
sample
2004 Jan 15
1
nlme vs aov with Error() for an ANCOVA
Hi
I compouted a multiple linear regression with repeated measures on one
explanatory variable:
BOLD peak (blood oxygenation) as dependent variable,
and as independent variables I have:
-age.group (binaray:young(0)/old(1))
-and task-difficulty measured by means of the reaction-time 'rt'. For
'rt' I have repeated measurements, since each subject did 12 different
tasks.
-> so
2016 Apr 02
3
apply mean function to a subset of data
Dear all;
This must have a rather simple answer but haven't been able to figure it
out: I have a data frame with say 2 groups (group 1 & 2). I want to select
from group 1 say "n" rows and calculate the mean; then select "m" rows from
group 2 and calculate the mean as well. So far I've been using a for loop
for doing it but when it comes to a large data set is
2011 Apr 18
1
Comparing two lines - Ancova: lm or aov?
Hello!
I have measurements (length and volume) of fish collected in two years. I
want to know if the the relationship between length and volume is the same
for both years. The number of fish measured is different for each year. I
don't know whether lm or aov is more appropriate to use.
Here are the two output options:
Call:
lm(formula = Volume ~ Length * Year)
Residuals:
Min 1Q