A function of class
"nonlin" to specify a multiplicative interaction in
the formula argument to
a comma-separated list of two or more symbolic expressions representing the constituent multipliers in the interaction.
a positive integer specifying the instance number of the term.
Mult specifies instances of a multiplicative interaction,
i.e. a product of the form
m_1 m_2 ... m_n,
where the constituent multipliers m_1, m_2, ..., m_n are linear or nonlinear predictors.
Models for the constituent multipliers are specified symbolically
as unspecified arguments to
Mult. These symbolic expressions
are interpreted in the same way as the right hand side of a formula in
an object of class
"formula", except that an intercept term
is not added by default. Offsets can be added to constituent
The family of multiplicative interaction models include row-column association models for contingency tables (e.g., Agresti, 2002, Sec 9.6), log-multiplicative or UNIDIFF models (Erikson and Goldthorpe, 1992; Xie, 1992), and GAMMI models (van Eeuwijk, 1995).
A list with the required components of a
the expressions passed to
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.
Agresti, A (2002). Categorical Data Analysis (2nd ed.) New York: Wiley.
Erikson, R and Goldthorpe, J H (1992). The Constant Flux. Oxford: Clarendon Press.
van Eeuwijk, F A (1995). Multiplicative interaction in generalized linear models. Biometrics 51, 1017-1032.
Vargas, M, Crossa, J, van Eeuwijk, F, Sayre, K D and Reynolds, M P (2001). Interpreting treatment by environment interaction in agronomy trials. Agronomy Journal 93, 949–960.
Xie, Y (1992). The log-multiplicative layer effect model for comparing mobility tables. American Sociological Review 57, 380-395.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
set.seed(1) ## Using 'Mult' with 'Exp' to constrain the first constituent multiplier ## to be non-negative ## Fit the "UNIDIFF" mobility model across education levels unidiff <- gnm(Freq ~ educ*orig + educ*dest + Mult(Exp(educ), orig:dest), family = poisson, data = yaish, subset = (dest != 7)) ## Not run: ## (this example can take quite a while to run) ## ## Fitting two instances of a multiplicative interaction (i.e. a ## two-component interaction)) yield.scaled <- wheat$yield * sqrt(3/1000) treatment <- factor(paste(wheat$tillage, wheat$summerCrop, wheat$manure, wheat$N, sep = "")) bilinear2 <- gnm(yield.scaled ~ year + treatment + instances(Mult(year, treatment), 2), family = gaussian, data = wheat) formula(bilinear2) ## yield.scaled ~ year + treatment + Mult(year, treatment, inst = 1) + ## Mult(year, treatment, inst = 2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.