Displaying 20 results from an estimated 50000 matches similar to: "R example for ancova"
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
2012 Jan 11
2
problems with glht for ancova
I've run an ancova, edadysexo is a factor with 3 levels,and log(lcc) is the
covariate (continous variable)
I get this results
> ancova<-aov(log(peso)~edadysexo*log(lcc))
> summary(ancova)
Df Sum Sq Mean Sq F value Pr(>F)
edadysexo 2 31.859 15.9294 803.9843 <2e-16 ***
log(lcc) 1 11.389 11.3887 574.8081 <2e-16 ***
2010 Nov 24
0
Hospital ANOVA/ANCOVA problem
Hi everyone,
I've only been using R for a week or so now, and am now required to work
with some pretty mixed data at my hospital.
Basically, we're looking to see if hypertension status (nominal) affects
cardiac function (multiple & continuous). In order to do this, we've
collected multiple echocardiograph data reports on each patient.
1. Each patient is coded either as 0 or 1
2011 Oct 07
1
ANOVA/ANCOVA Repeated Measure Mixed Model
Hello,
I am trying to test some results I have for significance. It has been
recommended that I use R and I am completely new to this.
Set-up:
Groups: two groups of 8 subjects (16 total)
Two conditions: alert and passive
Measurements: responses for three different stimuli (A, B, and C)
measured in each condition
Experiment: Testing the order of conditions
Group one: Alert A, B
2012 Dec 03
0
Nested ANCOVA question
Hello R experts,
I have having a difficult time figuring out how to perform and interpret an ANCOVA of my nested experimental data and would love any suggestions that you might have.
Here is the deal:
1) I have twelve tanks of fish (1-12), each with a bunch of fish in them
2) I have three treatments (1-3); 4 tanks per treatment. (each tank only has one treatment applied to it)
3) I sampled
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
2013 Sep 20
0
Best way to specify a mixed ANCOVA in R?
I initially posted this question to one of the StackExchange sites, and they suggested that I repost my problem here.
After using ezANOVA as my primary way of specifying mixed ANOVAs, I've hit a stumbling block when it come to adding a covariate to the model. I am using an ANCOVA in order to determine if there is a developmental trajectory in my data; namely, I need to be able to see the
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
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
2011 Sep 29
1
simplest pgfSweave example results in error
Hello,
since 3 days now I try to get pgfSweave running using Eclipse + StatET.
I created a super simple .Rnw file which can be viewed here:
http://www.text-upload.com/read.php?id=147992&c=6441045 test.Rnw
When I use sweave it works perfectly fine but when I use pgfSweave I get an
error.
The R output can be viewed here:
http://www.text-upload.com/read.php?id=147995&c=3804886 R output
2007 Apr 18
0
Specifying ANCOVA models in R
Hi all,
I am trying to fit an ANOVA model in R using the aov/lm commands. I have a
set of observational (i.e. no fixed experimental effects) data, in which I
have identified high and low clusters of the response variable. The design
is unbalanced, with 773 high cluster observations, and 523 low cluster
observations. I would like to test a set of 7 correlates to see if there are
significant
2005 Dec 14
1
ANCOVA & Post-hoc test
Hello,
Despite my search, I didn't find a post-hoc test for an ANCOVA.
I used the functions aov() and lm() to run the ANCOVA then I tried
TukeyHSD() but it didn't work (because of the covariable is a continuous
variable?).
Furthermore, I would like to plot the adjusted values (i.e. the values of
the tested variable taking into account the covariable).
Thanks for your help!
N. Poulet
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 Feb 10
2
Mixed ANCOVA with between-Ss covariate?
Hi all,
I have data from an experiment with 3 independent variables, 2 are
within and 1 is between. In addition to the dependent variable, I have
a covariate that is a single measure per subject. Below I provide an
example generated data set and my approach to implementing the ANCOVA.
However the output confuses me; why does the covariate only appear in
the first strata? Presumably it should
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
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
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 01
1
Post-hoc test on ANCOVA
Dear R-helpers,
I have an ANCOVA with a significant effect of the factor, which has
three levels. I wish to determine which of the levels are different
from each other but, because my model was fitted with lm(), I cannot
use TukeyHSD.
For some reason, I get different results (no significant effect of the
factor) when I fit the model using aov() so, for the moment, I am
using lm().
Could anyone
2010 Sep 29
1
Problems extracting p-value from summary(aov(...))
Hi,
I did a aov and used summary to obtain the p-value. I tried many ways to
extract the p-value from
the summary result but failed. Among others I tried the following:
> test.summary <-
> summary(aov(data[,1]~time.points+Error(subject/time.points)))
> test.summary
Error: subject
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 9 0.27467 0.030518
Error:
2011 Oct 13
3
Create order of numbers based on a given vector
Hello!
If I have a vector vec <- c(FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE
FALSE)
I can I create the following order of numbers based on vector vec:
1, 2, 2, 3, 3, 3, 4, 5
Whenever there is a FALSE I increase the number (starting with 1).
Whenever there is a TRUE I set the same number as the previous FALSE has
been assigned to.
I would be happy for any input
Cheers,
Syrvn
--
View