View source: R/predict_scores.R
predict_scores | R Documentation |
An easy wrapper for the thurstonianIRT::predict()
function
predict_scores(estimated_model, newdata, output_file = NULL)
estimated_model |
Estimated model |
newdata |
Response data from new response samples, in TIRT data format.
Preferably be generated from |
output_file |
Character string. If specified, output the trait scores into a specified csv file. |
A data frame containing estimated trait scores of the new response sample
Mengtong Li
test_data <- triplet_example_data[1:20,]
block_info <- triplet_block_info
test_data_long <- get_TIRT_long_data(block_info = triplet_block_info, response_data = test_data,
response_varname = build_TIRT_var_names(N_blocks = 5,
block_size = 3, item_name = "i"),
block_name = "Block", item_name = "ID",
trait_name = "Factor", sign_name = "Keying")
## Not run:
test_fit <- fit_TIRT_model(test_data_long, method = "mplus")
predict_scores(test_fit$fit_object, newdata = test_data[21:40,])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.