You can use the "offset" function as part of a formula in "lm" (and other model fitting functions) to set a specific slope or set of slopes. Using this up front will give you the correct residuals, standard errors, etc. This is better than trying to modify a fitted regression object.
On Tue, Nov 12, 2013 at 9:33 AM, <coll...@pitt.edu> wrote: > Greetings, I'm working on a project where I want to hand-tailor an lm. > Specifically I want to construct an lm with an existing formula and then > hand tailor the coefficients myself. Is there an established method for > that other than manipulating the $coefficients values? > > Thank you, > Collin. > > ______________________________________________ > R-help@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. -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com ______________________________________________ R-help@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.