Re: [R] ancova for dependent response

2016-11-21 Thread Jeff Newmiller
Yes. https://lmgtfy.com/?q=R+ancova -- Sent from my phone. Please excuse my brevity. On November 21, 2016 9:09:58 PM PST, li li wrote: >Hi all, >Is there an R function which can handles dependent response in Analysis >of covariance model. The dependence structure is known and is

[R] ancova for dependent response

2016-11-21 Thread li li
Hi all, Is there an R function which can handles dependent response in Analysis of covariance model. The dependence structure is known and is there to account for it in ANCOVA analysis in R? Thanks. Hanna [[alternative HTML version deleted]] _

[R] ANCOVA with 2 within-subject factors

2012-10-14 Thread shihyu
Hi, I have two within-subject factors A and B, and covariate CV, and wanna run an ANCOVA on the dependent variable DV. my code is: ancova=aov(DV~factor(A)*factor(B)+CV+Error(factor(subject)/(factor(A)*factor(B))),data=data) Is that correct? -- View this message in context: http://r.78969

[R] ANCOVA with 2 within-subject factors

2012-10-14 Thread shihyu
Hi, I have 2 factors A and B, and the covariate CV, and wanna run an within-subject ANCOVA on the dependent variable DV. Previously my ANOVA was anova=aov(DV~factor(A)*factor(B)+Error(factor(subject)/(factor(A)*factor(B))),data=data) how do I modify this code to included a covariate CV to run

[R] ANCOVA with 2 within-subject factors

2012-10-14 Thread shihyu
Hi, I have two within-subject factors A and B, and covariate CV, and wanna run an ANCOVA on the dependent variable DV. my code is: ancova=aov(DV~factor(A)*factor(B)+CV+Error(factor(subject)/(factor(A)*factor(B))),data=data) Is that correct? -- View this message in context: http://r.789695

[R] ANCOVA power

2012-05-16 Thread Xan
Dear list members: I am trying to calculate power for an ANCOVA analysis. I have found different solutions such as power.t.test and power.anova.test but they seem to refer to the ANOVA part of the ANCOVA. My model is of the form: lm (y ~ factor + x1 + x2 + x2*myfactor) where myfactor is a fact

Re: [R] ANCOVA post-hoc test

2012-02-12 Thread David Winsemius
On Feb 12, 2012, at 7:39 AM, Evagelopoulos Thanasis wrote: Could you please help me on the following ANCOVA issue? This is a part of my dataset: sampling dist h 1wi 200 0.8687212 2wi 200 0.8812909 3wi 200 0.8267464 4wi0 0.8554508 5wi0

Re: [R] ANCOVA post-hoc test

2012-02-12 Thread Richard M. Heiberger
I am at my machine now. The subset of the data you sent has only two groups and doesn't have a significant interaction. Therefore I can't talk about specifics for your example. The glht test you did compared the means of the sampling factor ignoring the dist covariate. Your description said you

Re: [R] ANCOVA post-hoc test

2012-02-12 Thread Rmh
ancova in HH is a wrapper for aov that displays a set of lattice plots. the problem you are seeing is probably that glht ignores covariates (with an appropriate message) unless you specify an optional argument. I will reply in more detail when i am at my computer. in the meantime, look at ?glht

Re: [R] ANCOVA post-hoc test

2012-02-12 Thread peter dalgaard
Inline below On Feb 12, 2012, at 13:39 , Evagelopoulos Thanasis wrote: [...] > > Because there exist significantly different regression slopes, I did a post > hoc test with glht() to find out between which samplings: > >> summary(glht(mod, linfct=mcp(sampling="Tukey"))) > I believe this compa

[R] ANCOVA post-hoc test

2012-02-12 Thread Evagelopoulos Thanasis
Could you please help me on the following ANCOVA issue? This is a part of my dataset: sampling dist h 1wi 200 0.8687212 2wi 200 0.8812909 3wi 200 0.8267464 4wi0 0.8554508 5wi0 0.9506721 6wi0 0.8112781 7wi 400 0.868721

[R] ANCOVA with many levels of one factor

2011-11-04 Thread suzzy
I am trying to do and ANCOVA with ten sites that I want to compare condition at, with Length as a covariate. Most examples I have found only deal with two levels and I am unsure if the same code applies for more than two levels. Here is what I have, and I just wanted to double check that I am on t

Re: [R] ANCOVA for linear regressions without intercept

2011-04-05 Thread Yusuke Fukuda
PM To: Yusuke Fukuda; 'Peter Ehlers' Cc: r-help@r-project.org Subject: RE: [R] ANCOVA for linear regressions without intercept Hi Yusuke, Does the following get what you are after? ### Make some test data. > set.seed(123) > edf <- data.frame(sex = c(rep("Male"

Re: [R] ANCOVA for linear regressions without intercept

2011-04-05 Thread Yusuke Fukuda
rc.ca] Sent: Tuesday, 5 April 2011 12:08 PM To: Yusuke Fukuda; 'Peter Ehlers' Cc: r-help@r-project.org Subject: RE: [R] ANCOVA for linear regressions without intercept Hi Yusuke, Does the following get what you are after? ### Make some test data. > set.seed(123) > edf <- data

Re: [R] ANCOVA for linear regressions without intercept

2011-04-04 Thread Steven McKinney
ot;blue", lty = 2) > abline(a = 0, b = coef(lmr1f)[2], col = "orange", lty = 2, lwd = 4) > The other two tests can be set up and run similarly. Don't forget to adjust for multiple comparisons... HTH Steve Steven McKinney, Ph.D. Statistician Molecular Oncology an

Re: [R] ANCOVA for linear regressions without intercept

2011-04-04 Thread Yusuke Fukuda
ssage- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Saturday, 2 April 2011 1:35 AM To: Yusuke Fukuda Cc: 'Bert Gunter'; r-help@r-project.org Subject: Re: [R] ANCOVA for linear regressions without intercept See inline. On 2011-03-31 22:22, Yusuke Fukuda wrote: > Thanks Ber

Re: [R] ANCOVA for linear regressions without intercept

2011-04-01 Thread Peter Ehlers
usuke Fukuda Cc: r-help@r-project.org Subject: Re: [R] ANCOVA for linear regressions without intercept If you haven't already received an answer, a careful reading of ?formula will provide it. -- Bert On Wed, Mar 30, 2011 at 11:42 PM, Yusuke Fukuda wrote: Hello R experts I have two linear regre

Re: [R] ANCOVA for linear regressions without intercept

2011-03-31 Thread Yusuke Fukuda
fference is significant or not. Thanks for your help. From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Friday, 1 April 2011 12:56 AM To: Yusuke Fukuda Cc: r-help@r-project.org Subject: Re: [R] ANCOVA for linear regressions without intercept If y

Re: [R] ANCOVA for linear regressions without intercept

2011-03-31 Thread Bert Gunter
If you haven't already received an answer, a careful reading of ?formula will provide it. -- Bert On Wed, Mar 30, 2011 at 11:42 PM, Yusuke Fukuda wrote: > > Hello R experts > > I have two linear regressions for sexes (Male, Female, Unknown). All have a > good correlation between body length (r

[R] ANCOVA for linear regressions without intercept

2011-03-31 Thread Yusuke Fukuda
Hello R experts I have two linear regressions for sexes (Male, Female, Unknown). All have a good correlation between body length (response variable) and head length (explanatory variable). I know it is not recommended, but for a good practical reason (the purpose of study is to find a single c

Re: [R] [r] ANCOVA method

2010-12-03 Thread Bert Gunter
Francesco: 1. You need to seek local statistical help. 2. The answer to your question is: it depends in how you define "influence significantly." If you define it as "the interaction term is significant" then, by definition the answer is yes. If you want to understand what is going on and make me

[R] [r] ANCOVA method

2010-12-03 Thread Francesco Nutini
Dear [R] Users, I have implemented a linear model with this syntax: model<- lm (var_dependent ~ var_indipendent + factor + var_indipendent : factor, dataframe) anova (model) Response: var_dependent Df Sum Sq Mean Sq F valuePr(>F) var_indip

[R] ancova help

2010-10-19 Thread Jacob Kasper
I am trying to run an ancova and am having trouble setting it up properly. I have nearly 10,000 measurements of fish length, girth and stage of sexual development. I am suspicious that the stage of development is affecting the length (as they get full of eggs they get more round and are more diffic

[R] ancova help

2010-10-19 Thread Jacob Kasper
I am trying to run an ancova and am having trouble setting it up properly. I have nearly 10,000 measurements of fish length, girth and stage of sexual development. I am suspicious that the stage of development is affecting the length (as they get full of eggs they get more round and are more diffic

Re: [R] ANCOVA in R, single CoVar, two Variables

2010-05-12 Thread Tom W
Thankyou all for the replies! I am sure you can guess the next question that is coming... I expanded the code (and the data set) to now include a third type "C", which I made VERY similar to A: anco <- read.table(tmp, header=TRUE) close.connection(tmp) wind <- data.frame(day=rep(anco$day, 3)

Re: [R] ANCOVA in R, single CoVar, two Variables

2010-05-11 Thread RICHARD M. HEIBERGER
I recommend the ancova function in the HH package. install.packages("HH") library(HH) example(ancova) ?ancova For your example, tmp <- textConnection( "day A B 0 10.010.0 7 9.0 9.1 14 8.0 8.2 21 7.0 7.3 28 6.0 6.4 35 5.0 5.5 42

[R] ANCOVA in R, single CoVar, two Variables

2010-05-11 Thread Tom W
Hello, I am VERY new to R, just picking it up infact. I have got my head around the basics of ANOVA with post hoc tests but I am struggling with regression, especially with ANCOVAs. I have two sets of data, one of type A, one of type B. Both have been placed in a wind tunnel and sampled every w

[R] ancova

2010-04-18 Thread ATANU
can anyone help me how to do a complete analysis of covariance in RBD?pls help me... -- View this message in context: http://n4.nabble.com/ancova-tp2014984p2014984.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org m

[R] ANCOVA with measurement error in x and y

2010-01-26 Thread Dylan Beaudette
7;, 'run 2')) # plot: library(lattice) xyplot(y ~ x, data=d, groups=id, type=c('p','r')) # ANCOVA summary(l <- lm(y ~ x * id, data=d)) # plot confidence intervals dotplot(confint(l), col=1, xlab='95% Conf. Int.') Is there any way to tell if these two pop

Re: [R] ANCOVA with defined error terms

2009-08-25 Thread hpdutra
Could someone or Richard explain to me what he meant by "This also shows a singular Error(). We look at the data and see that plot is identical to the three-way veget:fruit:block interaction." It seems to me that I just needed to recoded the plots, in order to get rid of the Error message. If t

Re: [R] ANCOVA with defined error terms

2009-08-23 Thread hpdutra
When we ran a regular ANOVA we showed that both mice and raccoons respond positively to cover. So we decided to use raccoons as a co-variate because those are mouse predators and their presence per se could explain part of the variation on mice activity. That is the reason why I'm running this AN

Re: [R] ANCOVA with defined error terms

2009-08-23 Thread Richard M. Heiberger
Ok, now we can talk. 1. covariates: coon Your model specification put coon sequentially last, effectively testing the hypothesis that the slope associated with coon, after adjusting for all the factors, is zero. My model place coon sequentially first, effectively testing the hypotheses that the

Re: [R] ANCOVA with defined error terms

2009-08-23 Thread hpdutra
What does the command c:\progra~1\R\R-2.9.1\bin\Rgui --vanilla do? At first I thought that I could run it from R. But then it did not work. I'm using a mac, and I don't know how access MSDOS in a mac. I actually installed R on the pc and tried to run the command from MSDOS and it also didn't wor

Re: [R] ANCOVA with defined error terms

2009-08-22 Thread Richard M. Heiberger
Your model formula cannot be correct. The phrase Error(block/plot, data = track) is wrong. It has to be something like this Error(block/plot), data = track The Error function requires a well-defined formula. The "," character cannot be inside the Error function. You misunderstood my use of

Re: [R] ANCOVA with defined error terms

2009-08-22 Thread hpdutra
I can actually run the code from my post. I used the nabble for my list server http://www.nabble.com/ANCOVA-with-defined-error-terms-td25055311.html#a25100032 I don't know which server you use, but that one is not truncated, I can copy the code just fine and run it. Anyway, here it is again summ

Re: [R] ANCOVA with defined error terms

2009-08-22 Thread Richard M. Heiberger
Your email program truncated the model. It would not run, hence was not reproducible. The last few characters of the first line are +Error(block/plot, which is syntactically impossible because there is no closing parenthesis before the comma. Try executing your email and see the difficulty.

Re: [R] ANCOVA with defined error terms

2009-08-22 Thread hpdutra
Hi Richard, there are no empty cells. I transform everything into factor, except the co-variate coon. Here is the full analysis with dput of the data. I'm afraid I have not enough DF for the thre-way interaction using your model as well. 12 plots divided in 3 blocks, each plot assigned to 2 cros

Re: [R] ANCOVA with defined error terms

2009-08-22 Thread Richard M. Heiberger
The three-way interactions you mention are included in the model formula I suggested. If they didn't appear in the expansion, it suggests that you have some aliasing due to empty cells. I can't do any more without your dataset. You can post your dataset with random response values. The exact dat

Re: [R] ANCOVA with defined error terms

2009-08-22 Thread hpdutra
Thank you Richard, this works. But, the model you suggested me lacks some between subjects interactions, namely: veget:time:block fruit:time:block. According to Sokal and Rohlf I need to report those as well. Also, any ideas why the sum of squares on my model are different from yours summar

Re: [R] ANCOVA with defined error terms

2009-08-20 Thread Richard M. Heiberger
Yes, I meant summary(). anova() isn't defined for aovlist objects and summary() is. Warning message: In aov(kotz.mice ~ kotz.coon + block * veget * fruit * time - block:veget:fruit:time + : Error() model is singular You will need to investigate the singular Error() model. You might want

Re: [R] ANCOVA with defined error terms

2009-08-20 Thread hpdutra
Thanks Richard, I tried running the analysis the way you suggested but here is the error that I get > track.aov <- aov(mice ~ coon+block*veget*fruit*time - > block:veget:fruit:time + + Error(block/plot), data = track) Warning message: In aov(kotz.mice ~ kotz.coon + block * veget

Re: [R] ANCOVA with defined error terms

2009-08-19 Thread Richard M. Heiberger
track.aov <- aov(mice ~ coon + block*veget*fruit*time - block:veget:fruit:time + Error(block/plot), data = track) anova(track.aov) I think this is what you are looking for. This model in words says, What is the effect of the four-way crossing after adjusting fo

[R] ANCOVA with defined error terms

2009-08-19 Thread hpdutra
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 mo

Re: [R] Ancova

2009-01-30 Thread John Fox
Dear Patrick, > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Patrick B é dard > Sent: January-30-09 6:31 PM > To: r-help@r-project.org > Subject: [R] Ancova > > Hello, > > I have the following

[R] Ancova

2009-01-30 Thread Patrick Bédard
Hello, I have the following ancova: my_ancova = aov(x~a+b) How do I obtain the means of b once the covariate a has been removed? thanks __ Patrick Bédard Ph.D. Dept. of Neuroscience Brown University [[alternative HTML version deleted]] __

Re: [R] ANCOVA

2008-12-09 Thread Greg Snow
TECTED] > project.org] On Behalf Of Samuel Okoye > Sent: Tuesday, December 09, 2008 2:03 AM > To: [EMAIL PROTECTED] > Subject: [R] ANCOVA > > > Hello, > > Could you please help me in the following question: > I have 16 persons 6 take 0.5 mg, 6 take 0.75 mg and 4 take placebo! Can &

[R] ANCOVA

2008-12-09 Thread Samuel Okoye
Hello,   Could you please help me in the following question: I have 16 persons 6 take 0.5 mg, 6 take 0.75 mg and 4 take placebo! Can I use the ANCOVA and t-test in this case? Is it possible in R?   Thank you in advance, Samuel [[alternative HTML version deleted]] ___

Re: [R] ANCOVA/glm missing/ignored interaction combinations

2008-09-03 Thread ONKELINX, Thierry
answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens lara harrup (IAH-P) Verzonden: woensdag 3 september 2008 10:47 Aan: r-help@r-project.org Onderwerp: [R

Re: [R] ANCOVA/glm missing/ignored interaction combinations

2008-09-03 Thread Mark Difford
And perhaps I should also have added: fit your model without an intercept and look at your coefficients. You should be able to work it out from there quite easily. Anyway, you now have the main pieces. Regards, Mark. Mark Difford wrote: > > Hi Lara, > >>> And I cant for the life of me work ou

Re: [R] ANCOVA/glm missing/ignored interaction combinations

2008-09-03 Thread Mark Difford
Hi Lara, >> And I cant for the life of me work out why category one (semio1) is being >> ignored, missing >> etc. Nothing is being ignored Lara --- but you are ignoring the fact that your factors have been coded using the default contrasts in R, viz so-called treatment or Dunnett contrasts. Tha

[R] ANCOVA/glm missing/ignored interaction combinations

2008-09-03 Thread lara harrup (IAH-P)
Hi I am using R version 2.7.2. on a windows XP OS and have a question concerning an analysis of covariance with count data I am trying to do, I will give details of a scaled down version of the analysis (as I have more covariates and need to take account of over-dispersion etc etc) but as I am sur

Re: [R] ANCOVA: Next steps??

2008-08-16 Thread Prof Brian Ripley
On Sat, 16 Aug 2008, Brown, Heidi wrote: Having spent the last few weeks trying to decipher R, I feel I may finally be getting somewhere, but i'M still in need of some advice and all my tutors seem to be on holiday! Basically a bit of background, I have data collected on a population of Liza

[R] ANCOVA: Next steps??

2008-08-16 Thread Brown, Heidi
Having spent the last few weeks trying to decipher R, I feel I may finally be getting somewhere, but i'M still in need of some advice and all my tutors seem to be on holiday! Basically a bit of background, I have data collected on a population of Lizards which includes age,sex, and body condit

Re: [R] Ancova: formula with a common intercept

2008-06-02 Thread Rolf Turner
On 3/06/2008, at 2:56 AM, Daniel Brewer wrote: I have some data with two categorises plus/minus (p53) and a particular time (Time) and the outcome is a continuous vairable (Result). I set up a maximum model. ancova <- lm(Result~Time*p53) summary(ancova) .. Coefficients: Esti

[R] Ancova: formula with a common intercept

2008-06-02 Thread Daniel Brewer
I have some data with two categorises plus/minus (p53) and a particular time (Time) and the outcome is a continuous vairable (Result). I set up a maximum model. ancova <- lm(Result~Time*p53) > summary(ancova) .. Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.05919

Re: [R] ANCOVA error again

2008-04-21 Thread Gavin Simpson
On Mon, 2008-04-21 at 17:21 +0200, Birgit Lemcke wrote: > Hello Gavin, > > thanks for you answer. > If I use it without " with" I get back the same error. > The "with" thing was only to try out for functions that do not > contain a data-argument. I still try to learn and therefor I > sometimes

Re: [R] ANCOVA error again

2008-04-21 Thread Birgit Lemcke
Hello Gavin, thanks for you answer. If I use it without " with" I get back the same error. The "with" thing was only to try out for functions that do not contain a data-argument. I still try to learn and therefor I sometimes just try. It is understood that I am on the way to simplify the mode

Re: [R] ANCOVA error again

2008-04-21 Thread Gavin Simpson
On Mon, 2008-04-21 at 15:43 +0200, Birgit Lemcke wrote: > Hello R users! > > I got again an error message. Something here is causing compiled code to segfault ("crash"). I don't know what the problem is here exactly --- I'll let those much more acquainted with R look into that --- but you seem to

Re: [R] ANCOVA error again

2008-04-21 Thread Birgit Lemcke
Hello R users! I got again an error message. I used this code: with (FemMal85_Sex, { ModelFemMal85<- glm (Sex~outLatTep_like_other*outLatTep_like_conduplicate*outLatTep_keeled_w inged*spathellae_co

Re: [R] ANCOVA

2008-04-21 Thread Birgit Lemcke
Hello John, I am really sorry about that. I wanted to include the code but I forgot and you are completely right, I forgot the family-argument. Thanks for the help. B. Am 21.04.2008 um 14:50 schrieb John Fox: > Dear Brigit, > > My guess is that you forgot to specify the argument family=binom

Re: [R] ANCOVA

2008-04-21 Thread John Fox
Dear Brigit, My guess is that you forgot to specify the argument family=binomial in the call to glm(). Had you included the commands that you used as well as the error that was produced, it wouldn't be necessary to guess. I hope this helps, John On Mon, 21 Apr 2008 14:23:13 +0200 Birgit Lemck

[R] ANCOVA

2008-04-21 Thread Birgit Lemcke
R version 2.6.2 PowerBook G4 Hello R User, I try to perform an ANCOVA using the glm function. I have a dataset with continuous and categorical data (explanatory variables) and my response variable is also binary categorical. Fehler: NA/NaN/Inf in externem Funktionsaufruf (arg 4) Zusätzlich: Wa

Re: [R] Ancova doesn't return test statistics

2007-11-15 Thread Gustaf Rydevik
On Nov 15, 2007 4:36 PM, Johan A. Stenberg <[EMAIL PROTECTED]> wrote: > 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 vari

Re: [R] Ancova doesn't return test statistics

2007-11-15 Thread Richard M. Heiberger
Your model is fully saturated. It specifies terms that use up all degrees of freedom. There are no degrees of freedom left over for a Residual term and therefore there is no denominator for the tests. When you drop one term, then those degrees of freedom are left over, that is they form the Res

Re: [R] Ancova doesn't return test statistics

2007-11-15 Thread Marc Schwartz
On Thu, 2007-11-15 at 16:36 +0100, Johan A. Stenberg wrote: > 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 >

[R] Ancova doesn't return test statistics

2007-11-15 Thread Johan A. Stenberg
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 Herbi