Skip to content
Prev 255804 / 398506 Next

ANCOVA for linear regressions without intercept

Thank you for your suggestions, stats experts. Much appreciated.

I still haven't got what I wanted but someone suggested looking into contrasts and this is looking worth trying http://finzi.psych.upenn.edu/R/library/gmodels/html/fit.contrast.html

Regards,

Yusuke

-----Original Message-----
From: Peter Ehlers [mailto:ehlers at ucalgary.ca] 
Sent: Saturday, 2 April 2011 1:35 AM
To: Yusuke Fukuda
Cc: 'Bert Gunter'; r-help at r-project.org
Subject: Re: [R] ANCOVA for linear regressions without intercept

See inline.
On 2011-03-31 22:22, Yusuke Fukuda wrote:
You probably want:

  lm(body_length ~ head_length + sex:head_length-1)

or, in short form:

  lm(body_length ~ head_length/sex-1)

You might then compare the model 'without intercepts'
(i.e. with intercepts forced to zero) with a model that
includes intercepts. If the intercepts turn out to
be significantly nonzero, what will you do?

Peter Ehlers