var_cat: Calculate Variance of Binary or Ordinal Variable

Description Usage Arguments Value References See Also

Description

This function calculates the variance of a binary or ordinal (r > 2 categories) variable. It uses the formula given by Olsson et al. (1982, doi: 10.1007/BF02294164) in describing polyserial and point-polyserial correlations. The function is used to find intercorrelations involving ordinal variables or variables that are treated as ordinal (i.e. count variables in the method used in rcorrvar2). For an ordinal variable with r >= 2 categories, the variance is given by:

∑_{j=1}^{r} {y_{j}}^{2}*p_{j} - {(∑_{j=1}^{r} y_{j}*p_{j})}^{2}

. Here, y_{j} is the j-th support value and p_{j} is Pr(Y = y_{j}). This function would not ordinarily be called by the user.

Usage

1
var_cat(marginal, support)

Arguments

marginal

a vector of cumulative probabilities defining the marginal distribution of the variable; if the variable can take r values, the vector will contain r - 1 probabilities (the r-th is assumed to be 1)

support

a vector of containing the ordered support values

Value

A scalar equal to the variance

References

Olsson U, Drasgow F, & Dorans NJ (1982). The Polyserial Correlation Coefficient. Psychometrika, 47(3): 337-47. doi: 10.1007/BF02294164.

See Also

ordnorm, rcorrvar, rcorrvar2, findintercorr_cont_cat, findintercorr_cont_pois2,
findintercorr_cont_nb2


AFialkowski/SimMultiCorrData documentation built on May 23, 2019, 9:34 p.m.