[R] Ancova: formula with a common intercept
Daniel Brewer
daniel.brewer at icr.ac.uk
Mon Jun 2 16:56:14 CEST 2008
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 0.55646 0.106 0.916
Time -0.02134 0.01785 -1.195 0.241
p53plus 0.17059 0.78696 0.217 0.830
Time:p53plus 0.11887 0.02524 4.709 4.62e-05 ***
..
>From a plot of the data and the result of the linear model it looks like
the two categories share the same intercept. How do I define this? I
tried this:
> ancova2<-update(ancova,~.-1)
> summary(ancova2)
Call:
lm(formula = Result ~ Time + p53 + Time:p53 - 1)
..
Coefficients:
Estimate Std. Error t value Pr(>|t|)
Time -0.02134 0.01785 -1.195 0.241
p53minus 0.05919 0.55646 0.106 0.916
p53plus 0.22977 0.55646 0.413 0.682
Time:p53plus 0.11887 0.02524 4.709 4.62e-05 ***
But I do not think that is doing what I want.
Many thanks
--
**************************************************************
Daniel Brewer, Ph.D.
Institute of Cancer Research
Molecular Carcinogenesis
Email: daniel.brewer at icr.ac.uk
**************************************************************
The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
This e-mail message is confidential and for use by the a...{{dropped:2}}
More information about the R-help
mailing list