View source: R/predict.GPCMlasso.R
| predict.GPCMlasso | R Documentation |
Predict category probabilities or linear predictors from a fitted
GPCMlasso model.
## S3 method for class 'GPCMlasso'
predict(
object,
coefs = NULL,
newdata = NULL,
theta = NULL,
type = c("link", "response"),
trait.cores = 1,
...
)
object |
|
coefs |
Optional vector of coefficients, can be filled with a specific
row from |
newdata |
Optional data frame containing the covariates used for
prediction. The right-hand side of |
theta |
Optional vector of trait values used for prediction. Required
when |
type |
|
trait.cores |
Number of cores used for computing posterior trait
estimates within prediction on the original data. The default is |
... |
Further predict arguments. |
Predictions are based on a selected coefficient vector. If no coefficient vector is supplied, the cross-validation optimal coefficient vector is used when cross-validation was performed; otherwise, the BIC-optimal coefficient vector is used.
For predictions on the original data, posterior trait estimates are obtained
from trait.posterior(). For predictions on newdata, trait
values must be supplied via the argument theta, because posterior
trait estimation for new persons requires response data and is not inferred
automatically from covariates alone.
Results are lists of vectors with length equal to the number of response
categories in case of probabilities (type = "response") or the
number of adjacent-category logits in case of linear predictors
(type = "link").
Gunther Schauberger
gunther@stat.uni-muenchen.de
GPCMlasso
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.