predict_scores {autoFC} | R Documentation |
Predict trait scores based on estimated model
Description
An easy wrapper for the thurstonianIRT::predict()
function
Usage
predict_scores(estimated_model, newdata, output_file = NULL)
Arguments
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. |
Value
A data frame containing estimated trait scores of the new response sample
Author(s)
Mengtong Li
Examples
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)
[Package autoFC version 0.2.0.1002 Index]