library(serp)
m <- serp(rating ~ temp + contact, slope = "penalize",
reverse = TRUE, link = "logit", tuneMethod = "user",
lambda = 1, data = wine)
head(predict(m, type = "link"))
head(predict(m, type = "response"))
predict(m, type = "class")
n.wine <- wine[1:20,]
predict(m, newdata = n.wine, type = "class")
Run the code above in your browser using DataLab