[R] covariate or predictor
gunter.berton at gene.com
Wed Nov 26 03:49:04 CET 2014
Yes, Rolf -- she seems to think that covariates must be categorical
and predictors categorical -- or maybe it's vice-versa. Anyway, she
apparently has not done any homework (e.g. by reading an Intro to R)
and so doesn't understand the use of modeling formulas in lm() and
thus does not understand the use of contrasts (= dummy variables). As
you said, either stackexchange or perhaps a local consultant is
probably where she should be seeking advice,
Genentech Nonclinical Biostatistics
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
On Tue, Nov 25, 2014 at 6:13 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
> On 26/11/14 13:57, Kristi Glover wrote:
>> I am wondering how I can separate whether it is covariate or predictor in
>> the ANOVA analysis. For example
>> A<-structure(list(Machine = c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
>> 2L, 3L, 3L, 3L, 3L, 3L), Diameter = c(20L, 25L, 24L, 25L, 32L,
>> 22L, 28L, 22L, 30L, 28L, 21L, 23L, 26L, 21L, 15L), Strength = c(36L,
>> 41L, 39L, 42L, 49L, 40L, 48L, 39L, 45L, 44L, 35L, 37L, 42L, 34L,
>> 32L)), .Names = c("Machine", "Diameter", "Strength"), class =
>> "data.frame", row.names = c(NA,
>> I am confused here whether the "Mechine" is covariate or predictor. How
>> do I know which one is covariate and predictor?
>> If Machine is predictor (just like Diameter), how I am supposed to write
>> in the model?
>> is the equation (below) for this one in the condition that the Machine is
>> c1<-aov(Strength~Diameter+Machine), ?????. If it is so, it means that
>> co-variate is dummy variable, right????
>> Your help will really help me to clear the concept.
> (1) Please don't post in HTML; messages with code in them become unreadable.
> (2) This isn't really an R question is it? Possibly better posted to
> (3) What in your mind is the difference between "covariate" and "predictor"?
> In my (possibly limited) understanding, the words are synonymous.
> (4) Are you perhaps concerned with the difference between a continuous
> predictor and a categorical (factor) predictor?
> (5) In your example "Machine" is pretty clearly *categorical*; the
> numbers 1, 2, and 3 are just *labels* for the machines; their numerical
> value is of no significance. The labels could just as well be "A", "B"
> and "C", or "melvin", "irving" and "clyde".
> (6) OTOH "Diameter" is pretty obviously interpretable as a *numerical*
> (7) I have no idea what you mean by "If it is so, it means that co-variate
> is dummy variable, right????" Would you care to translate that into
> Rolf Turner
> Rolf Turner
> Technical Editor ANZJS
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help