Skip to content
Prev 256884 / 398506 Next

saving a regression model to a file

On Apr 14, 2011, at 12:45 PM, Alison Callahan wrote:

            
Your error is above, in that you are assigning the result of load() to a new object and presuming that the new object contains 'pcrmodel'. 

If you look at ?load, you will see that the function returns a character vector of the names of the objects contained in the file you are loading.

Thus, 'model' is a character vector as show below, in this case, likely containing a single entry of "pcrmodel". Type:

 model

at the R prompt....


If you use:

  summary(pcrmodel)

after the load() call, you should get your normal model summary output. When using load(), it restores the saved objects in the file to the current workspace. If you use:

  ls()

you should see 'pcrmodel' listed, along with anything else in your current workspace.

HTH,

Marc Schwartz