Learn R Programming

RM.weights (version 2.0)

prob.assign: Probabilistic assignment of cases to classes of severity along the latent trait.

Description

This function assigns cases probabilistically to classes of severity along the latent trait. This procedure is useful when different (cultural-geographical-linguistic) contexts are compared in terms of the prevalence of some phenomenon.

Usage

prob.assign(rr=NULL,  rwthres = NULL, sthres = NULL, 
eps.a = NULL, flex = list(a=NULL, se.a=NULL, d=NULL, XX=NULL, wt=NULL))

Arguments

rr

An object of RM.w type.

rwthres

Raw score thresholds. If this argument is specified, corresponding thresholds on the latent trait (thres) are provided as output.

sthres

Alternative argument to rwthres. Thresholds on the latent trait. If this argument is specified, probability of being beyond the specified thresholds (sprob) is provided as output.

eps.a

Tolerance for the algorithm that estimates thresholds on the latent trait corresponding to the specified thresholds in terms of raw score (rwthres). If left unspecified, the tolerance to convergence is 0.001.

flex

Alternative argument to rr. If rr=NULL, than flex needs to be specified as a list with the following arguments: a (person parameters), se.a (person parameter standard errors), d (pseudo-raw-scores for estimation of extreme raw score parameters; if left unspecified leads to estimate the k-th raw score parameter at location (k-1)+0.5), XX (input data matrix or data frame), wt (sampling weights; if left unspecified leads to sampling weights equal to one for all subjects).

Value

A list with the following elements:

sprob Estimated weighted probability of being beyond thresholds provided in sthres (\(P(x)\)). If sthres argument is not specified, the sprob value is NULL.
thres Thresholds on the latent trait calculated corresponding to thresholds in terms of raw-score specified in rwthres.
f Probability of being beyond the thres thresholds distributed across raw scores. If more than one assumption on the exreme raw scores is made in rr, it is a list of a number of elements equal to the number of assumptions made.
p Empirical (weighted) distribution beyond the raw scores specified in rwthres. If only one assumption on the extreme raw scores is made, then colSums(f) is approximately equal to p, where the order of approximation depends on eps.a.
f_j Empirical (weighted) distribution across the raw scores.

Details

The probabilistic assignment procedure is particularly useful when comparing results between different populations that might have interpreted some items of a scale differently. The distribution of the raw score is assumed to be a mixture of Gaussian densities, each centred on the raw score parameters (estimated using the Rasch model) and scaled with corresponding measurement errors. The resulting (complementary) cumulative prevalence, weighted by the proportion of individuals in each raw score, is as follows: $$ P(x)= \sum_{i=0}^N (1-\int_{-Inf}^x f_i(t)dt) p_i = \sum_{i=0}^N (1-F_i(x)) p_i, $$ where \(f_i\) is the probability density function (and \(F_i\) is the cumulative distribution function) of severity levels centred on raw score parameter \(i\) and scaled with the corresponding measurement error, \(p_i\) is the proportion observed in raw score \(i\), and \(N\) is the maximum number of items. The function \(P(x)\) can be used to trace a continuous profile of prevalence on the latent trait for the phenomenon of interest. It allows to equate different metrics and it facilitates cross-cultural comparisons. The prob.assign function can be used in two ways: providing the rwthres argument, i.e. specifying thresholds in terms of raw score, it provides the estimation of the thresholds on the latent trait that correspond to the raw score thresholds; providing the sthres argument, i.e. specifying thresholds on the latent trait, it provides the probability of being beyond the specified thresholds for the population of interest.

See Also

RM.w

Examples

Run this code
# NOT RUN {
data(data.FAO_country1)
# Questionnaire data and weights
XX.country1 = data.FAO_country1[,1:8]
wt.country1 = data.FAO_country1$wt
# Fit weighted Rasch
rr.country1 = RM.w(XX.country1, wt.country1)

# Thresholds on the latent trait corresponding to a given raw score
pp.country1 = prob.assign(rr.country1, rwthres = c(3, 7))

# Table with prevalences and thresholds
tab = cbind("Raw score" = c(3, 7), "Latent trait" =  pp.country1$thres, 
"Prevalence" = colSums(pp.country1$f))
rownames(tab) = c("Thres 1","Thres 2")
tab

# Pre-defined thresholds on the latent trait
sthresh = c(-0.25, 1.81)
pp.country1.2 = prob.assign(rr.country1, sthres = sthresh)$sprob
# Probability of being beyond -0.25 on the latent trait in country 1 
pp.country1.2[1]*100
# Probability of being beyond 1.81 on the latent trait in country 1 
pp.country1.2[2]*100

# More than 2 extremes
# Fit the model
rr.country1.d = RM.w(XX.country1, wt.country1, .d = c(0.5, 7.5, 7.7))
# Probabilistic assignment
pp.country1.d = prob.assign(rr.country1.d, sthres = sthresh)$sprob
# Probability of being beyond -0.25 on the latent trait in country 1 
# using upper assumption on the extreme raw score parameter 8
pp.country1.d[[1]]*100
# Probability of being beyond -0.25 on the latent trait in country 1 
# using lower assumption on the extreme raw score parameter 8
pp.country1.d[[2]]*100
# }

Run the code above in your browser using DataLab