Draw plausible, i.e. posterior predictive sumscores on a set of items.
a connection to a dexter database, a matrix, or a data.frame with columns: person_id, item_id, item_score
An object returned by function fit_enorm
and containing
parameter estimates. If parms is given the function provides plausible scores conditional on the
item parameters. These are considered known. If parms
is NULL
, Bayesian parameters are calculated from the datasrc
an expression to filter data. If missing, the function will use all data in dataSrc
vector of item_id's, this specifies the itemset to generate the testscores for. If items
is NULL
all items occurring in dataSrc
are used.
when the item parameters are estimated Bayesianly (see: fit_enorm
),
parms_draw specifies whether to use a sample(a different item parameter draw for each plausible values draw) or the posterior mean
of the item draws. Alternatively, it can be an integer specifying a specific draw. Ignored when parms is not estimated Bayesianly.
name or a vector of names of the variables to group the population, used to update the prior. A covariate must be a discrete person covariate that indicates nominal categories, e.g. gender or school If dataSrc is a data.frame, it must contain the covariate.
Number of plausible testscores to generate per person.
use a normal prior for the plausible values or a mixture of two normals. A mixture is only possible when there are no covariates.
If responses to one or more of the items have been observed, the user can choose to keep these observations or generate new ones.
return scores per item instead of sumscores
If a person took multiple booklets, this indicates whether plausible scores are generated per person (TRUE) or per booklet (FALSE)
A data.frame with columns booklet_id, person_id, booklet_score and nPS plausible scores named PS1...PSn.
A typical use of this function is to generate plausible scores on a complete item bank when data is collected using an incomplete design