A function of class "nonlin"
to specify a van der Heijden & Mooijaart (1995) skew-symmetric
association in the formula argument to gnm
.
HMSkew(row, col, inst = NULL)
the levels of the row variable
the levels of the column variable
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 hmskew
to fit skew-symmetric models proposed by
van der Heijden & Mooijaart (1995) and their variants. It can be used directly to fit custom
variants of the model not supported by hmskew
.
This function combines its arguments in the following way: $$ HMSkew(i, j) = \nu_i \mu_j - \mu_i \nu_j $$ where \(HMSkew(i, j)\) is the skew association for the cell at the intersection of row i and column j of the table. See reference for mathematical details.
van der Heijden, P.G.M., and Mooijaart, A. (1995). Some new log bilinear models for the analysis of asymmetry in a square contingency table. Sociol. Methods and Research 24, 7-29.
# NOT RUN {
# See ?hmskew.
# }
Run the code above in your browser using DataLab