Estimate Person Paramters and calculate Person Fit in one step to gain resonse pattern assessment. Submit a data.frame which contains item responses, or an fitted model (Rasch Model and Partial Credit Model are supported) of the eRm package.

PPass(...)

# S3 method for default
PPass(
  respdf,
  items = "all",
  mod = c("1PL", "2PL", "3PL", "4PL", "PCM", "GPCM", "MIXED"),
  fitindices = c("lz", "lzstar", "infit", "outfit"),
  ...
)

# S3 method for Rm
PPass(RMobj, fitindices = c("lz", "lzstar", "infit", "outfit"), ...)

Arguments

respdf

A data.frame which contains the items, and perhaps other informations. Each row is a person related resonse patter. Each column denotes a variable.

items

A numeric (integer) vector which indicates the positions of the items in the data.frame (respdf). If items = 'all', all columns are treated as items.

mod

Choose your data generating model. This argument switches between the three person parameter estimating functions PP_4pl, PP_gpcm and PPall.

fitindices

A character vector which denotes the fit indices to compute.

RMobj

A fitted Rasch Model (RM()) object which stems from the eRm package.

...

Submit arguments to the underlying functions: PP_4pl, PP_gpcm and PPall (see documentation files) for person parameter estimation.

Value

The original data.frame and

  • The Person Parameter estimates incl. Standard Errors (2 columns)

  • Person Fit Indices you chose (1 or more)

Details

PPass fuses Person Parameter estimation and Person Fit computation into a single function.

See also

Author

Manuel Reif, Jan Steinfeld

Examples

library(eRm) ### real data ########## data(pp_amt) d <- pp_amt$daten_amt rd_res <- PPass(respdf = d, items = 8:ncol(d), mod="1PL", thres = pp_amt$betas[,2], fitindices = "lz")
#> Estimating: 1pl model ... #> type = wle #> Estimation finished!
head(rd_res)
#> estimate SE lz lz_unst #> 1 1.4098572 0.4177670 -0.631024 -0.613445 #> 2 0.3515596 0.3728684 1.229632 -0.627897 #> 3 1.0745004 0.3741313 1.097723 -0.627596 #> 4 0.3204585 0.6900186 0.981576 -0.494311 #> 5 1.3879159 0.4643975 -0.203399 -0.600039 #> 6 0.9457363 0.4184999 0.573956 -0.615722
## ========== RM - eRm my_data <- eRm::sim.rasch(200, 12) my_rm <- eRm::RM(my_data) res_pp1 <- PPass(my_rm)
#> Estimating: 1pl model ... #> type = wle #> Estimation finished!
## ========== PCM - eRm set.seed(2751) THRES <- matrix(c(-2,-1.23,1.11,3.48,1 ,2,-1,-0.2,0.5,1.3,-0.8,1.5),nrow=2) THRES <- rbind(THRES,c(-0.2,NA,NA,NA,NA,NA)) sl <- rep(1,6) THRESx <- rbind(0,THRES) THETA <- rnorm(200) simdat_gpcm <- sim_gpcm(thres = THRESx,alpha = sl,theta = THETA) my_pcm <- eRm::PCM(simdat_gpcm) res_pp2 <- PPass(my_pcm)
#> Estimating: GPCM ... #> type = wle #> Estimation finished!
#> Warning: Only 'infit and outfit' are currently supported. The calculation is executed with infit outfit
## ========== 1PL model set.seed(1337) # intercepts diffpar <- seq(-3,3,length=15) # slope parameters sl <- round(runif(15,0.5,1.5),2) la <- round(runif(15,0,0.25),2) ua <- round(runif(15,0.8,1),2) # response matrix awm <- matrix(sample(0:1,100*15,replace=TRUE),ncol=15) awm <- as.data.frame(awm) # estimate person parameter # estimate person parameter and person fit out <- PPass(respdf = awm,thres = diffpar, items="all", mod=c("1PL"), fitindices= c("lz","lzstar","infit","outfit"))
#> Estimating: 1pl model ... #> type = wle #> Estimation finished!
# show first rows head(out)
#> estimate SE lz lz_unst lzstar infit in_t in_chisq #> 1 0.2283002 0.6819765 -3.083081 -0.870676 -3.086058 2.020659 2.305126 47.064 #> 2 0.2283002 0.6819765 -5.785447 -1.242104 -5.790820 2.966794 3.732302 70.659 #> 3 -0.6878210 0.6874864 -5.900059 -1.239635 -5.953959 2.886533 3.635684 80.964 #> 4 -2.1690639 0.7630686 -6.072526 -1.122556 -7.131986 2.506919 2.974178 227.247 #> 5 -1.1569232 0.6998950 -2.673938 -0.777026 -2.759479 1.761801 1.850323 60.601 #> 6 0.2283002 0.6819765 -6.824819 -1.384962 -6.831113 3.295854 4.156107 85.261 #> in_df in_pv outfit ou_t ou_chisq ou_df ou_pv #> 1 14 0 3.137599 2.433293 47.064 14 0 #> 2 14 0 4.710578 3.451529 70.659 14 0 #> 3 14 0 5.397579 3.423889 80.964 14 0 #> 4 14 0 15.149777 3.515269 227.247 14 0 #> 5 14 0 4.040039 2.329902 60.601 14 0 #> 6 14 0 5.684096 3.970965 85.261 14 0