Skip to content

set intercept in glm to non-0

3 messages · Peter Palenchar, David Winsemius, Thomas Lumley

#
I know how to make the intercept 0 in glm, but I actually want to 
force my intercept to be 1.  Is there a way I can do this?

Peter
#
Use an offset with a non-intercept model?

I wonder if there could be problems depending on the choice of family.

--  
David Winsemius
On Mar 16, 2009, at 9:29 PM, Peter Palenchar wrote:

            
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
#
On Mon, 16 Mar 2009, David Winsemius wrote:

            
Yes

dat$ones<-1
glm(y~0+x+offset(ones), data=dat, family=whatever)
Only in the sense that if the model fits badly it might run up against the edge of the parameter space in some families, which is no different than the potential problems with a zero intercept.

       -thomas
Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle