TITLE: ESTIMATION OF CID FOR A BINARY SCORED ITEM (STEP 1).
DATA: FILE = ;
VARIABLE: NAMES = X1-XP; ! ENTER NUMBER OF ITEMS FOR P HERE AND NEXT.
CATEGORICAL = X1-XP; ! P = # ITEMS.
ANALYSIS: TYPE = BASIC;
Note. CID = classical item difficulty (proportion correct response). Consult output section “FIRST ORDER SAMPLE PROPORTIONS” for the CID estimate. (Exclamation mark is used for a following clarification comment.)
TITLE: INTERVAL ESTIMATION OF CID FOR A BINARY SCORED ITEM (STEP 2).
(CID ESTIMATE, D, OBTAINED FROM PRECEDING STEP 1.)
DATA: FILE = ;
VARIABLE: NAMES = X1-XP; ! P = # ITEMS.
CATEGORICAL = X1-XP;
MODEL: F1 BY X1-XP; ! PROVIDES ALSO TEST OF HOMOGENEITY HYPOTHESIS.
MODEL CONSTRAINT:
NEW(D, SE, L, SEL, CI_L_LO, CI_L_UP, CI_D_LO, CI_D_UP);
D = #; ! ENTER ESTIMATE OBTAINED IN STEP 1 (FOR ITEM OF INTEREST).
SE = (D*(1-D)/N)**.5; ! ENTER SAMPLE SIZE FOR N.
K = LOG(D/(1-D)); ! LOGIT TRANFORM.
SEK = SE/(D*(1-D)); ! S.E. FOR TRANSFORM.
CI_K_LO = L-1.96*SEK; ! CI OF LOGIT TRANSFORM, k.
CI_K_UP = L+1.96*SEK;
CI_D_LO = 1/(1+EXP(-CI_K_LO); ! CI IN (7) – CI OF CID (AND NEXT).
CI_D_UP = 1/(1+EXP(-CI_K_UP));
Note. The NEW command introduces all quantities needed for calculation of the limits of the CI (7). In the lines for the logit-transformed CID, ?, use corresponding standard normal cut-offs if a CIs at another confidence level is desired – e.g., 1.645 for a 90%-CI. (See Raykov & Marcoulides, 2011a, for further details and illustrative examples of the above two analytic steps as well as of the following Step 3.)
Alternatively, the R-function given next can be employed to obtain a CI (at the 95%-confidence level) for the CID, after estimating the CID with the above Step 1 Mplus command file (see note to it; see also Raykov & Marcoulides, 2011a, for explanations of R commands involved in this and following R-functions as well as applications of them).
ci.cid = function(d, n){
se = sqrt(d*(1-d)/n)
k = log(d/(1-d))
sek = se/(d*(1-d))
ci_k_lo = l-1.96*sek
ci_k_up = l+1.96*sek
ci_lo = 1/(1+exp(-ci_k_lo))
ci_up = 1/(1+exp(-ci_k_up))
ci = c(ci_lo, ci_up)
ci
}
Note. At the R prompt after pasting this function, call the latter stating the CID estimate as ‘d’ and sample size as ‘n’ in it (i.e., at the R prompt appearing after typing the function, enter ci.cid(d,n) where that estimate is given for ‘d’ and sample size for ‘n’). In the lines for the logit-transformed CID, use corresponding standard normal cut-off if a CI at another confidence level is desired.
TITLE: POINT AND INTERVAL ESTIMATION OF INTER-ITEM AND ITEM-TOTAL
CORRELATIONS FOR AN INITIAL ITEM SET (STEP 3).
DATA: FILE = ;
VARIABLE: NAMES = X1-XP; ! P = # ITEMS.
CATEGORICAL = X1-XP;
USEVARIABLE = X1-XP X; ! THIS LINE ENABLES OBTAINING POLYSERIAL
! CORRELATION ESTIMATES WITH THEIR LARGE-SAMPLE STANDARD ERRORS.
DEFINE: X = X1+X3+…+XP; ! USE THIS IF INTERESTED IN THE ADJUSTED
! ITEM-TOTAL CORRELATION FOR THE 2nd ITEM SAY.
ANALYSIS: TYPE = BASIC;
To obtain CIs for inter-item correlations and/or (adjusted) item-total correlations, call the following R function (entering for ‘c’ and ‘se’ their estimates and standard errors obtained from Step 3):
ci.pc <- function(c, se){
z = .5*log((1+c)/(1-c))
sez = se/((1-c^2))
ci_z_lo = z-1.96*sez
ci_z_up = z+1.96*sez
ci_lo = (exp(2*ci_z_lo)-1)/(exp(2*ci_z_lo)+1)
ci_up = (exp(2*ci_z_up)-1)/(exp(2*ci_z_up)+1)
ci = c(ci_lo, ci_up)
ci
}
Note. In the lines for the Fisher-transform ‘z’, use corresponding standard normal cut-offs if CIs at other confidence levels are desired. (Illustration examples are provided in Raykov & Marcoulides, 2011a).