Description Usage Arguments Examples
This function takes the output from a fitted model and plots the item
parameters. More precisely, the probability to pass an item's threshold
Φ(0-β) for an average person with θ=0 is depicted as a
function of the cognitive process involved (i.e., MRS, ERS, ARS, target
trait) and both traitItem
and revItem
.
1 2 3 |
fit |
a fitted object from |
fitModel |
Character. Either |
revItem |
vector of length J specifying reversed items (1=reversed, 0=regular) |
traitItem |
vector of length J specifying the underlying traits (e.g., indexed from 1...5). Standard: only a single trait is measured by all items. If the Big5 are measured, might be something like c(1,1,1,2,2,2,...,5,5,5,5) |
return_data |
Logical indicating whether the data frame used for plotting should be returned. |
tt_names |
Optional character vector with the name(s) of the target trait(s). |
measure |
Character vector that indicates whether the mean (default) or the median of the posterior distribution should be plotted. |
rs_names |
Character vector. Names of the MPT parameters used for plotting, defaults to something like |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
J <- 10
betas <- cbind(rnorm(J, .5), rnorm(J, .5), rnorm(J, 1.5), rnorm(J, 0))
dat <- generate_irtree_ext(N = 20, J = J, betas = betas, beta_ARS_extreme = .5)
# fit model
res1 <- fit_irtree(dat$X, revItem = dat$revItem, M = 200)
plot_irtree(res1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.