tab.weight: Rasch descriptives and weighted tables.

Description Usage Arguments Value Author(s) Examples

Description

This function computes the main descriptive tables (number of affirmative responses to each item, weighted and unweighted distribution across raw scores, etc.), weighted and unweighted, for Rasch scale items and respondents. It also computes (univariate or bivariate) tables for user-specified variables.

Usage

1
tab.weight(variab, wt, XX = NULL)

Arguments

variab

It could be a single variable, or a list of two variables, of factor type.

wt

Vector of sampling weights. length(variab) = length(wt).

XX

0/1 data matrix or data frame of responses to the questionnaire. Affirmative responses must be coded as 1s. If left unspecified, basic descriptive statistics for Rasch analysis (number of Yes per item, weighted and unweighted distribution across raw scores, etc.) are not computed.

Value

RS.abs.w

Absolute weighted distribution across raw scores. Only computed when XX is not null.

RS.rel.w

Relative weighted distribution across raw scores. Only computed when XX is not null.

RS.abs

Absolute unweighted distribution across raw scores. Only computed when XX is not null.

RS.rel

Relative unweighted distribution across raw scores. Only computed when XX is not null.

Perc.Yes

Proportion of Yes responses to each item. Only computed when XX is not null.

Perc.Yes.w

Weighted proportion of Yes responses to each item. Only computed when XX is not null. Only computed when XX is not null.

rv

Vector of raw scores.

tab.ext.w

Weighted table for the variable variab. If variab is a list, a bivariate frequency table is computed.

Author(s)

Sara Viviani sara.viviani@fao.org

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
data(data.FAO_country1)
XX.country1 = data.FAO_country1[,1:8]
wt.country1 = data.FAO_country1$wt
gender = data.FAO_country1$gender
urbanrural = data.FAO_country1$urbanrural
# Univariate weighted table by gender
tab.weight(gender, wt.country1)$tab.ext.w

# Bivariate weighted table by gender and urban/rural
tab.weight(list(gender,urbanrural), wt.country1)$tab.ext.w

# Fit Rasch descriptives
fit.descr = tab.weight(wt = wt.country1, XX = XX.country1)
# Weighted distribution across raw-scores (absolute and relative)
cbind("Abs.RS distrib." = fit.descr$RS.abs.w, 
"Rel.RS distrib." = fit.descr$RS.rel.w)
# Weighted and unweighted percentage of Yes per item
cbind("Weighted perc. of Yes" = fit.descr$Perc.Yes.w, 
      "Unweighted perc. of Yes" = fit.descr$Perc.Yes)

## End(Not run)

Nwosu/new_RM_weights documentation built on May 7, 2019, 8:21 p.m.