[R] turning coefficients into an lm obect

Jarrett Byrnes byrnes at nceas.ucsb.edu
Fri Jul 15 19:05:05 CEST 2011

I'm working with a dataset and fitting and comparing various lms.  I also have a fitted model parameter values and SE estimated from the literature.  In doing my comparison, I'd like to turn these estimates into an lm object itself for ease of use with some of the code I'm writing.  While putting in the coefficients is a simple matter - just take a fitted model object and change the values of the mylm$coefficients, for example, it is not transparent to me how I could incorporate the parameter variance and, say, the unexplained variance in the previous fit.

Although, thinking about it further, the unexplained variance is specific to that dataset - so, I shouldn't have to worry about that.  But how can I incorporate known variance in the parameter estimates?



More information about the R-help mailing list