| responseCurve {pcFactorStan} | R Documentation |
Produce data suitable for plotting item response curves
Description
Selects samples random draws from the posterior and evaluates the item
response curve on the grid given by seq(from,to,by).
All items use the same responseNames. If you have some items
with a different number of thresholds or different response names
then you can call responseCurve for each item separately
and rbind the results together.
Usage
responseCurve(
dl,
fit,
responseNames,
item = dl$nameInfo$item,
samples = 100,
from = qnorm(0.1),
to = -from,
by = 0.02
)
Arguments
dl |
a data list prepared by |
fit |
a |
responseNames |
a vector of labels for the possible responses |
item |
a vector of item names |
samples |
number of posterior samples |
from |
the starting latent difference value |
to |
the ending latent difference value |
by |
the grid increment |
Value
A data.frame with the following columns:
- response
Which response
- worthDiff
Difference in worth
- item
Which item
- sample
Which sample
- prob
Associated probability
- responseSample
A grouping index for independent item response samples
Response model
See cmp_probs for details.
See Also
Other data extractor:
parDistributionCustom(),
parInterval()
Examples
vignette('manual', 'pcFactorStan')