mosaic (version 1.1.0)

gwm: Groupwise Models (Defunct)

Description

This has been removed from the package. Watch for improved modeling functions in the mosaicModel package.

Usage

gwm(formula, data = parent.frame(), drop = FALSE, ...)

Arguments

formula

A formula. The left-hand side specifies the response variable over which the mean or proportion will be taken. The right-hand side gives the explanatory variables, separated by +. Means or proportions are computed for every combination of the levels of the explanatory variables.

data

A data frame in which to evaluate variables in formula. If not specified, variables will be taken from the current environment.

drop

Logical flag indicating whether to drop unoccupied groups. Default FALSE. NOT YET IMPLEMENTED.

Additional arguments; currently ignored.

Value

mm returns an object of class groupwiseModel. The functions fitted.values, residuals, coefficients, and summary are useful for extracting various features of the value returned by mm

Details

gwm (groupwise model) is a sort of training function for lm, meant to provide a basis for discussing inference and introducing resampling in a simple, intuitive setting of groupwise means or proportions. lm provides a better, more general facility. When using lm to recreate the results of gwm, include all the interaction terms (i.e., use * instead of +) and remove the intercept term. See the examples.

See Also

lm(), do()