# prob.assign: Probabilistic assignment of cases to classes of severity... In Nwosu/RM.weights: Weighted Rasch modeling and extensions using Conditional Maximum Likelihood

## Description

This function assigns cases 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

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

## Arguments

 rr An object of RM.w type. rwthres Thresholds in terms of raw score, corresponding to which thresholds on the latent trait are calculated. sthres Thresholds in terms of latent trait. The probability of being beyond these thresholds is caculated. 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. ext.distr An external probability distribution (for instance, derived by a latent class analysis) corresponding to which thresholds on the latent trait can be estimated. This argument can be used only when length(d) = 2, in the RM.w object. 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 (assumption on the extreme raw score parameters; if left unspecified leads to estimate the k-th raw score parameter at location (k-1)+0.5), XX (questionnaire data), wt (sampling weights; if left unspecified leads to sampling weights equal to one for all subjects).

## 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 and scaled with the corresponding measurement error. The resulting (complementary) cumulative prevalence, weighted by the proportion of individuals in each raw score, is as follows:

P(x)= ∑_{i=0}^N (1-\int_{-Inf}^x f_i(t)dt) p_i = ∑_{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. Working on estimated parameters, instead of classifying individuals based on their raw score, it allows to equate different metrics and it facilitates cross-cultural comparisons.

## Value

A list with the following elements:

 sprob Estimated weighted probability of being beyond thresholds provided in sthres (P(x)). 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 divided by raw scores. If more than one assumption on the exreme raw scores is made in rr, it is going to be 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. extrathres Thresholds on the latent variable by considering the (optional) distribution provided in extra.distr. extraf Similar to the f value, but considering the (optional) distribution provided in extra.distr. f_j Empirical (weighted) distribution across the raw scores.

## Author(s)

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

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ## 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 = seq(-3, 3, 0.01) pp.country1.2 = prob.assign(rr.country1, sthres = sthresh) # Plot plot(sthresh,pp.country1.2$sprob, type = "l", xlab = "Thresholds", ylab = "Cumulative prevalence", main = "Country1 food insecurity prevalence") abline(v = pp.country1$thres[1], lty = 2) abline(v = pp.country1$thres[2], lty = 2) text(pp.country1$thres[1], colSums(pp.country1$f)[1], "Med.or high prev = 65%",cex = 0.8, pos = 4) text(pp.country1$thres[2], colSums(pp.country1$f)[2], "High prev = 29%", cex = 0.8, pos = 4) # More than 2 extremes # Fit the model rr.country1.d = RM.w(XX.country1, wt.country1, .d = c(0.2, 0.5, 7.5)) # Probabilistic assignment pp.country1.d = prob.assign(rr.country1.d, sthres = sthresh) # Plot plot(sthresh, pp.country1.d$sprob[[1]], type = "l", xlab = "Thresholds", ylab = "Cumulative prevalence") lines(sthresh, pp.country1.d$sprob[[2]], col = 2) ## End(Not run)