A function of class "nonlin"
to specify a Yamaguchi (1990) skew-symmetric association in
the formula argument to gnm
.
YRCSkew(row, col, rowinf, rowsup, inst = NULL)
for each cell in the table, the row category.
for each cell in the table, the column category.
must be 1 for cells above the diagonal, 0 for cells below and on the diagonal.
must be 1 for cells below the diagonal, 0 for cells above and on the diagonal.
a positive integer specifying the instance number of the term.
A list with the required components of a "nonlin"
function:
the expressions passed to Mult
a function to create a deparsed mathematical expression of the term, given labels for the predictors.
the call to use as a prefix for parameter labels.
This function is used by yrcskew
to fit the “row-column-effect skew-symmetric
association (logbilinear) model with full quasi-symmetry (QS+RC_SK)” proposed by Yamaguchi (1990).
It can be used directly to fit custom variants of the model not supported by yrcskew
.
This function combines its arguments in the following way:
$$ YRCSkew(row, col, rowinf, rowsup) = \delta_{rowinf} * \mu_{row} * (\mu_{col} - \mu_{row})
+ \delta_{rowsup} * \nu_{col} * (\nu_{row} - \nu_{col}) $$
When arguments are set according to what is suggested above, and the skew \(\delta\) parameter is
constrained to 1, this amounts to the equation:
$$ YRCSkew_{ij} = \delta_{i<j} \nu_i (\nu_j - \nu_i) - \delta_{i>j} \nu_j (\nu_i - \nu_j)
= (\delta_{i<j} - \delta_{i>j}) \nu_{min(i,j)} (\nu_{max(i,j)} - \nu_{min(i,j)})$$
where \(YRCSkew_{ij}\) is the skew association for the cell at the intersection of row i and column j of
the table. See reference for mathematical details, and the code of yrcskew
for real-world usage.
Yamaguchi, K. (1990). Some Models for the Analysis of Asymmetric Association in Square Contingency Tables with Ordered Categories. Sociol. Methodology 20, 181-212.
# NOT RUN {
# See ?yrcskew.
# }
Run the code above in your browser using DataLab