predict.TSVC | R Documentation |
Obtains predictions from a fitted TSVC object.
## S3 method for class 'TSVC'
predict(object, X_new = NULL, ...)
object |
a fitted object of class |
X_new |
optionally, data frame of class |
... |
further arguments passed to |
predict.TSVC
is a wrapper function of predict.glm
, which obtains predictions for objects of class glm
. Further
arguments can be passed to predict.glm
via the '...'-argument.
Moritz Berger <moritz.berger@imbie.uni-bonn.de>
https://www.imbie.uni-bonn.de/people/dr-moritz-berger/
Berger, M., G. Tutz and M. Schmid (2019). Tree-Structured Modelling of Varying Coefficients. Statistics and Computing 29, 217-229, https://doi.org/10.1007/s11222-018-9804-8.
TSVC
, plot.TSVC
, summary.TSVC
# Swiss Labour Market
library(AER)
data("SwissLabor")
# recode factors
sl <- SwissLabor
sl$participation <- as.numeric(sl$participation)-1
sl$foreign <- as.numeric(sl$foreign)-1
X_new <- data.frame("income"=c(10,12), "age"=c(4.5,5.8))
## Not run:
fit1 <- TSVC(participation~income+age, data=sl, family=binomial(link="logit"),
nperm=1000, trace=TRUE)
predict(fit1, X_new, type="response")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.