library(GRShiny)
<- genIRTpar(nitem = 10, ncat = 3, nfac = 1) item_pars
<- genTheta(nsample = 500, nfac = 1) true_theta
<- genData(eta = true_theta, ipar = item_pars) grm_dt
<- genLavSyn(dat = grm_dt, nfac = 1)
lav_syn #>
#> F1 =~ NA*y1+l1*y1+l2*y2+l3*y3+l4*y4+l5*y5+l6*y6+l7*y7+l8*y8+l9*y9+l10*y10
#>
#>
#> F1~~ 1*F1
#> F1~ 0*1
#> y1 | t11*t1;
#> y2 | t21*t1;
#> y3 | t31*t1;
#> y4 | t41*t1;
#> y5 | t51*t1;
#> y6 | t61*t1;
#> y7 | t71*t1;
#> y8 | t81*t1;
#> y9 | t91*t1;
#> y10 | t101*t1;
#> y1 | t12*t2;
#> y2 | t22*t2;
#> y3 | t32*t2;
#> y4 | t42*t2;
#> y5 | t52*t2;
#> y6 | t62*t2;
#> y7 | t72*t2;
#> y8 | t82*t2;
#> y9 | t92*t2;
#> y10 | t102*t2;
<- runGRM(dat = grm_dt, lav.syntax = lav_syn, estimator = "WL") grm.fit
extract_est(grm.fit)
#> lhs op rhs label est se z pvalue
#> 1 F1 =~ y1 l1 0.615 0.043 14.279 0.000
#> 2 F1 =~ y2 l2 0.775 0.035 22.118 0.000
#> 3 F1 =~ y3 l3 0.701 0.038 18.483 0.000
#> 4 F1 =~ y4 l4 0.545 0.048 11.293 0.000
#> 5 F1 =~ y5 l5 0.527 0.046 11.478 0.000
#> 6 F1 =~ y6 l6 0.584 0.044 13.215 0.000
#> 7 F1 =~ y7 l7 0.684 0.040 17.207 0.000
#> 8 F1 =~ y8 l8 0.761 0.035 21.499 0.000
#> 9 F1 =~ y9 l9 0.600 0.045 13.300 0.000
#> 10 F1 =~ y10 l10 0.661 0.040 16.436 0.000
#> 11 y1 | t1 t11 -0.126 0.056 -2.233 0.026
#> 12 y2 | t1 t21 -0.136 0.056 -2.412 0.016
#> 13 y3 | t1 t31 -0.161 0.056 -2.858 0.004
#> 14 y4 | t1 t41 -0.161 0.056 -2.858 0.004
#> 15 y5 | t1 t51 -0.202 0.057 -3.572 0.000
#> 16 y6 | t1 t61 -0.181 0.056 -3.215 0.001
#> 17 y7 | t1 t71 -0.222 0.057 -3.928 0.000
#> 18 y8 | t1 t81 -0.040 0.056 -0.715 0.475
#> 19 y9 | t1 t91 -0.100 0.056 -1.787 0.074
#> 20 y10 | t1 t101 -0.192 0.056 -3.393 0.001
#> 21 y1 | t2 t12 0.166 0.056 2.947 0.003
#> 22 y2 | t2 t22 -0.005 0.056 -0.089 0.929
#> 23 y3 | t2 t32 0.070 0.056 1.251 0.211
#> 24 y4 | t2 t42 0.121 0.056 2.144 0.032
#> 25 y5 | t2 t52 0.264 0.057 4.641 0.000
#> 26 y6 | t2 t62 0.181 0.056 3.215 0.001
#> 27 y7 | t2 t72 0.131 0.056 2.323 0.020
#> 28 y8 | t2 t82 0.105 0.056 1.876 0.061
#> 29 y9 | t2 t92 0.055 0.056 0.983 0.326
#> 30 y10 | t2 t102 0.141 0.056 2.501 0.012
ICCplot(grm.fit, 1)
ESplot(grm.fit , 1)
infoPlot(grm.fit, 1)
FSplot(grm.fit)
startGRshiny()