Hello, everyody,

when asking, e.g., Effect() to compute the effects of a fitted,
e.g., linear model after having deleted the data frame from the
workspace for which the model was obtained an error is reported:

> myair <- airquality
> fm <- lm(Ozone ~ Temp, data = myair)
> rm(myair)
> Effect("Temp", fm)
Error in eval(model$call$data, envir) : object 'myair' not found

Has anybody a better "workaround" for this than, e.g., explicitly
saving the fitted model object fm together with its original
environment or just the data needed frame (maybe in a list like
fm.plus.origdata <- list(fm, myair = myair)) to be able to restore
the original environemt (or at least the needed opriginal data
frame) of the time when fm was created?

Thx for any hint!

 Regards  --  Gerrit

---------------------------------------------------------------------
Dr. Gerrit Eichner                   Mathematical Institute, Room 212
gerrit.eich...@math.uni-giessen.de   Justus-Liebig-University Giessen
Tel: +49-(0)641-99-32104          Arndtstr. 2, 35392 Giessen, Germany
Fax: +49-(0)641-99-32109            http://www.uni-giessen.de/eichner

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to