A symbolic wrapper, for use in the formula argument to
gnm, to specify multiple instances of a term specified
by a function with an
instances(term, instances = 1)
a call to a function with an inst argument, which specifies some term.
the desired number of instances of the term.
A deparsed expression representing the summation of
inst = 1,
inst = 2, ...,
instances, which is used to create an expanded formula.
## 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.