predict.measrdcm {measr} | R Documentation |
Posterior draws of respondent proficiency
Description
Calculate posterior draws of respondent proficiency. Optionally retain all posterior draws or return only summaries of the distribution for each respondent.
Usage
## S3 method for class 'measrdcm'
predict(
object,
newdata = NULL,
resp_id = NULL,
missing = NA,
summary = TRUE,
probs = c(0.025, 0.975),
force = FALSE,
...
)
Arguments
object |
An object of class |
newdata |
Optional new data. If not provided, the data used to estimate
the model is scored. If provided, |
resp_id |
Optional. Variable name of a column in |
missing |
An R expression specifying how missing data in |
summary |
Should summary statistics be returned instead of the raw
posterior draws? Only relevant if the model was estimated with
|
probs |
The percentiles to be computed by the |
force |
If respondent estimates have already been added to the model
object with |
... |
Unused. |
Value
A list with two elements: class_probabilities
and
attribute_probabilities
.
If summary is FALSE
, each element is a tibble with the number of rows
equal to the number of draws in object
with columns: .chain
,
.iteration
, .draw
, the respondent identifier, and one column of
probabilities for each of the possible classes.
If summary is TRUE
, each element is a tibble with one row per respondent
and class or attribute, and columns of the respondent identifier, class
or attribute
, mean
, and one column for every value specified in
probs
.