montecarlo: performs Monte Carlo simulations to generate empirical...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/montecarlo.R

Description

performs Monte Carlo simulations under no-DIF conditions to generate empirical distributions of statistics

Usage

1
montecarlo(obj, alpha = 0.01, nr = 100)

Arguments

obj

an object returned from lordif

alpha

desired significance level (e.g., .01)

nr

number of replications

Details

Simulated datasets are generated under no-DIF conditions and have the same dimensions as the empirical dataset. Group n-sizes and differences (impact) in theta estimates are preserved in the simulated datasets. Returns empirical distributions and thresholds for various statistics and effect size measures.

Value

Returns an object (list) of class "lordif.MC" with the following components:

call

calling expression

chi12

prob associated with the LR Chi-square test comparing Model 1 vs. 2

chi13

prob associated with the LR Chi-square test comparing Model 1 vs. 3

chi23

prob associated with the LR Chi-square test comparing Model 2 vs. 3

pseudo12.CoxSnell

Cox & Snell pseudo R-square change from Model 1 to 2

pseudo13.CoxSnell

Cox & Snell pseudo R-square change from Model 1 to 3

pseudo23.CoxSnell

Cox & Snell pseudo R-square change from Model 2 to 3

pseudo12.Nagelkerke

Nagelkerke pseudo R-square change from Model 1 to 2

pseudo13.Nagelkerke

Nagelkerke pseudo R-square change from Model 1 to 3

pseudo23.Nagelkerke

Nagelkerke pseudo R-square change from Model 2 to 3

pseudo12.McFadden

McFadden pseudo R-square change from Model 1 to 2

pseudo13.McFadden

McFadden pseudo R-square change from Model 1 to 3

pseudo23.McFadden

McFadden pseudo R-square change from Model 2 to 3

beta12

proportional beta change from Model 1 to 2

alpha

significance level

nr

number of replications

cutoff

thresholds for the statistics

Note

nr must be a large integer (e.g., 500) to generate smooth distributions.

Author(s)

Seung W. Choi <choi.phd@gmail.com>

References

Choi, S. W., Gibbons, L. E., Crane, P. K. (2011). lordif: An R Package for Detecting Differential Item Functioning Using Iterative Hybrid Ordinal Logistic Regression/Item Response Theory and Monte Carlo Simulations. Journal of Statistical Software, 39(8), 1-30. URL http://www.jstatsoft.org/v39/i08/.

See Also

permute, lordif

Examples

1
2
3
4
5
6
7
##load PROMIS Anxiety sample data (n=766)
## Not run: data(Anxiety)
##age : 0=younger than 65 or 1=65 or older
##run age-related DIF on all 29 items (takes about a minute)
## Not run: age.DIF <- lordif(Anxiety[paste("R",1:29,sep="")],Anxiety$age)
##the following takes several minutes
## Not run: age.DIF.MC <- montecarlo(age.DIF,alpha=0.01,nr=100)

Example output

Loading required package: mirt
Loading required package: stats4
Loading required package: lattice
Loading required package: rms
Loading required package: Hmisc
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, units

Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

lordif documentation built on May 2, 2019, 2:13 p.m.