Hi list,
I want to write a general function so that it would take an lm object,
extract its data element, then use the data at another R function (eg, glm).
I searched R-help list, and found this would do the trick of the first part:
a.lm$call$data
this would return a name object but could not be
Hi,
the data of the model fit is stored in lm$model and should work
Good luck,
Thilo
On Friday 22 September 2006 16:45, Mike Wolfgang wrote:
Hi list,
I want to write a general function so that it would take an lm object,
extract its data element, then use the data at another R function
On Fri, 2006-09-22 at 10:45 -0400, Mike Wolfgang wrote:
Hi list,
I want to write a general function so that it would take an lm object,
extract its data element, then use the data at another R function (eg, glm).
I searched R-help list, and found this would do the trick of the first part:
On Fri, 22 Sep 2006, Thilo Kellermann wrote:
Hi,
the data of the model fit is stored in lm$model and should work
Not reliably. In the first place, you should use the accessor function
model.frame(model) rather than model$model, which works even if the model
was fitted with model=FALSE.
On Fri, 22 Sep 2006, Thomas Lumley wrote:
On Fri, 22 Sep 2006, Thilo Kellermann wrote:
Hi,
the data of the model fit is stored in lm$model and should work
Not reliably. In the first place, you should use the accessor function
model.frame(model) rather than model$model, which works