Learn R Programming

irtpwr (version 1.0.3)

plot.irtpwrresult: Plot Power Curves

Description

Plot the power curves using the resulting object of the irtpwr function.

Usage

# S3 method for irtpwrresult
plot(x, bounds = NULL, ...)

Value

A ggplot object

Arguments

x

Object of class irtpwrresult as created by the irtpwr function.

bounds

integer vector. the first entry is the lower bound of the x-axis in the plot (sample size). The second entry is the upper bound. By default, these values are chosen to cover a power range of .5 to .95.

...

additional arguments to be passed.

Examples

Run this code
# \donttest{

library(mirt)
dat <- expand.table(LSAT7)
mirtfit <- mirt(dat,1,verbose = FALSE)
hyp <- setup.hypothesis(type = '1PLvs2PL', altpars = mirtfit)
res <- irtpwr(hyp=hyp,alpha=.05,power =.8)
plot(res)
# }

Run the code above in your browser using DataLab