Description Usage Arguments Value Examples
Predicted values based on a psm object
1 2 | ## S3 method for class 'PSM'
predict(object, x, tx)
|
object |
an object of class 'PSM' |
x |
dataframe containing the values for each linear variable in the model with which to predict |
tx |
a vector containing the values for the spline variable in the model with which to predict |
returns a vector containing predicted values
1 2 3 4 5 6 7 8 9 | x <- data.frame(x = rnorm(100))
tx <- rnorm(100)
eps <- rnorm(100)
y <- x[,1] + tx^4 + eps
psm <- PartialSplines(y, x, tx)
x.new <- data.frame(x = rnorm(5))
tx.new <- rnorm(5)
y.pred <- predict(psm, x.new, tx.new)
y.pred
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.