View source: R/person.posterior.R
| trait.posterior | R Documentation |
Calculates posterior estimates for trait/person parameters for a fitted
GPCMlasso model using the assumed Gaussian distribution of the
person parameters.
trait.posterior(model, coefs = NULL, cores = 25, tol = 1e-04)
model |
Object of class |
coefs |
Optional vector of coefficients. If |
cores |
Number of cores used for parallel computation. |
tol |
Deprecated. Kept for backward compatibility. |
The function computes posterior means of the latent trait parameters by Gauss-Hermite quadrature. 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.
Numeric vector containing posterior estimates of the trait/person parameters.
Gunther Schauberger
gunther.schauberger@tum.de
GPCMlasso,
predict.GPCMlasso
data(tenseness_small)
form0 <- as.formula(
paste(
"cbind(",
paste(colnames(tenseness_small)[1:5], collapse = ","),
") ~ 0"
)
)
## Not run:
rsm0 <- GPCMlasso(
formula = form0,
data = tenseness_small,
model = "RSM",
control = ctrl_GPCMlasso(cores = 1, trace = FALSE)
)
theta_hat <- trait.posterior(rsm0, cores = 1)
summary(theta_hat)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.