PC.w: Estimation of the weighted partial credit model using CML

Description Usage Arguments Details Author(s) Examples

View source: R/PC.w.R

Description

This function computes item and raw score parameter estimates of a partial credit model for both dichotomous and polytomous item responses by using weighted CML estimation. The maximum number of response categories allowed is 4. Input data should be a 0/1 matrix (1 = Yes) for the dichotomous items and 0/1/2... up to the maximum number of categories for the polytomous items. Residual correlation, fit statistics and corresponding standard errors, Rasch reliability and individual fit statistics are also reported.

Usage

1
2
PC.w(XX, .wt=NULL, extr=NULL, maxiter=100,minconv=.00001,country=NULL,write.file=F,
            recode = c(0,1,2), write.iteration=F)

Arguments

XX

Input 0/1 (for dichotomous items) or 0/1/2/... (for polytomous items) data matrix or data frame; negative responses must be coded as 0s. Rows represent individuals, columns represent items. Missing values are inserted as NA.

.wt

Vector of sampling weights. The length must be the same as the number of rows of XX. If left unspecified, all the individuals will be equally weighted (.wt = rep(1, nrow(XX))).

extr

Optional vector for the assumption on the extreme raw score parameters. Default is 0.5 and (k-0.5), k being the maximum number of response categories.

maxiter, minconv

Convergence criteria.

country

Optional (character) name of the dataset.

write.file

If TRUE, a CSV file with the main model results will be saved in the working directory.

recode

This is a mandatory argument. It can be 0, 1 or 2. recode = 0 does not imply any category aggregation. recode = 1 aggregates the two more severe categories. recode=2 aggregates the two less severe categories.

write.iteration

If set TRUE a CSV file with information on the iteration process is produced in the working directory.

Details

The weighted CML method is used to estimate the item and Rasch-Thurstone parameters. Respondent parameters are estimated post-hoc. Cases with missing responses to some items can be included, but will not be used to estimate the Rasch model.

As the parameters for the extreme raw scores (0 and k), are undefined under the CML, some assumptions are needed unless the proportions of respondents with those raw scores are so small that they can be considered to be measured without error. Vector extr gives the possibility to include one assumption for raw score zero and one for raw score k. The assumption for raw score zero can be a number between 0 and 1 (excluded). The assumption for raw score k can be a number between k-1 and k (excluded).

Author(s)

Sara Viviani [email protected], Mark Nord [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
data(data.FAO_country1)
# Questionnaire data and weights
XX.country1 = data.FAO_country1[,1:8]
XX.country1[,c(7,8)] = cbind(rbinom(nrow(XX.country1), 3, .1), rbinom(nrow(XX.country1), 3, .2)) 
wt.country1 = data.FAO_country1$wt
# Fit weighted partial credit model with aggregation of the two more severe categories
rr.country1.pol2 = PC.w(XX.country1, wt.country1, recode = 1)
# Write output file
rr.country1.pol2 = PC.w(XX.country1, wt.country1, recode = 1, write.file=T)

## End(Not run)

Nwosu/new_RM_weights documentation built on May 9, 2017, 3:23 p.m.