[R] help with regression

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Tue Jul 26 11:38:57 CEST 2011

Dear Joe,

You need to use offset()
lm(y ~ a + offset(b) + c)

Best regards,


ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen

tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

> -----Oorspronkelijk bericht-----
> Van: r-help-bounces op r-project.org [mailto:r-help-bounces op r-project.org]
> Namens JoeP
> Verzonden: dinsdag 26 juli 2011 11:26
> Aan: r-help op r-project.org
> Onderwerp: [R] help with regression
> Hi,
> I am trying to do a linear regression but I want one of my variables to not
> generate a coefficient.  E.g. what I want to do is fit for y=a+b+c but forcing the
> coefficient of b to be 1.  Is this possible?
> I have been fitting y-b=a+c but I have found that when I recalculate y it is not
> close to the value.  I have assumed that by fitting y-b then the y part has become
> insignificant.  In case it makes a difference I have been using lm rather than glm.
> Thanks in advance,
> Joe
> --
> View this message in context: http://r.789695.n4.nabble.com/help-with-
> regression-tp3695245p3695245.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help op r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> 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 mailing list