View source: R/contingencyWt.R
| contingencyWt | R Documentation |
Compute (weighted) pairwise contingency coefficients.
contingencyWt(x, ...)
x |
for the default method, a vector that can be interpreted as factor.
For the matrix and |
... |
for the generic function, arguments to be passed down to the methods, otherwise ignored. |
The function tableWt is used for the computation of the
corresponding pairwise contingency tables. The following methods are implemented:
contingencyWt.default(x, y, weights = NULL, ...)
contingencyWt.matrix(x, weights = NULL, ...)
contingencyWt.data.frame(x, weights = NULL, ...)
Additional parameters are:
y: a vector that can be interpreted as factor (for the default method)
weights: an optional numeric vector containing sample weights
For the default method, the (weighted) contingency coefficient of
x and y.
For the matrix and data.frame method, a matrix of (weighted) pairwise
contingency coefficients for all combinations of columns. Elements below
the diagonal are NA.
Andreas Alfons and Stefan Kraft
Kendall, M.G. and Stuart, A. (1967) The Advanced Theory of Statistics, Volume 2: Inference and Relationship. Charles Griffin & Co Ltd, London, 2nd edition.
tableWt
data(eusilcS)
## default method
contingencyWt(eusilcS$pl030, eusilcS$pb220a, weights = eusilcS$rb050)
## data.frame method
basic <- c("age", "rb090", "hsize", "pl030", "pb220a")
contingencyWt(eusilcS[, basic], weights = eusilcS$rb050)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.