Description Usage Arguments Value Examples
Prediction based on the fitted model given the collpase/partition that selected by running the stochastic search
1 2 3 4 5 6 7 | fc.predict(data, model, varia.list, merge.list)
## S3 method for class 'glm'
fc.predict(data, model, varia.list, merge.list)
## S3 method for class 'rxGlm'
fc.predict(data, model, varia.list, merge.list)
|
data |
new dataset, such as testing data |
model |
model, such as training model including interactions |
varia.list |
variables to be collapsed |
merge.list |
graycodes |
prediction
1 2 3 4 5 6 7 8 9 10 11 | m1 <- glm(Claims ~ Kilometres+Zone+Bonus+Make, offset = log(Insured),
data = sweden, family = "poisson")
a <- fc.predict(data=sweden,
model = m1,
varia.list = c("Kilometres", "Zone", "Bonus", "Make"),
merge.list = list(c(1,2,3,4,4),
c(1,2,3,4,5,5,5),
c(1,1,1,2,3,4,5),
c(1,2,3,4,5,6,7,7,7)) )
b <- predict.glm(m1, type='response')
plot(cbind(a,b))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.