View source: R/plausible_scores.R
plausible_scores | R Documentation |
Draw plausible, i.e. posterior predictive sumscores on a set of items.
plausible_scores(
dataSrc,
parms = NULL,
predicate = NULL,
items = NULL,
parms_draw = c("sample", "average"),
covariates = NULL,
nPS = 1,
prior_dist = c("normal", "mixture"),
keep.observed = TRUE,
by_item = FALSE,
merge_within_persons = FALSE
)
dataSrc |
a connection to a dexter database, a matrix, or a data.frame with columns: person_id, item_id, item_score |
parms |
An object returned by function |
predicate |
an expression to filter data. If missing, the function will use all data in dataSrc |
items |
vector of item_id's, this specifies the itemset to generate the testscores for. If |
parms_draw |
when the item parameters are estimated Bayesianly (see: |
covariates |
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. |
nPS |
Number of plausible testscores to generate per person. |
prior_dist |
use a normal prior for the plausible values or a mixture of two normals. A mixture is only possible when there are no covariates. |
keep.observed |
If responses to one or more of the items have been observed, the user can choose to keep these observations or generate new ones. |
by_item |
return scores per item instead of sumscores |
merge_within_persons |
If a person took multiple booklets, this indicates whether plausible scores are generated per person (TRUE) or per booklet (FALSE) |
A typical use of this function is to generate plausible scores on a complete item bank when data is collected using an incomplete design
A data.frame with columns booklet_id, person_id, booklet_score and nPS plausible scores named PS1...PSn.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.