Displaying 1 result from an estimated 1 matches for "synthetic_data_4".
2011 Apr 14
1
saving a regression model to a file
...() to load it is one way to go.
However, when I use the save() function to save a model to a file, and
then try to load it using load(), the loaded "model" is just an object
of class Character. Here is the relevant R code:
#######creating the model#########
data <- read.table("../synthetic_data_4.csv", header=TRUE, sep=",")
data <- data.frame(data)
data$type <- factor(data$type)
pcrmodel <- pcr(formula=count~week+type+total, data=data, x=TRUE, y=TRUE)
#########getting summary of model########
summary(pcrmodel)
Output:
Data: X dimension: 318 4
Y dimension: 31...