Computes Marginal Models

DESCRIPTION:

Computes the margins in log-linear models. This routine is not normally called directly by users.

USAGE:

get.margins.Loglin(margins, nmes) 

REQUIRED ARGUMENTS:

margins
a formula or a list of vectors containing the marginal totals to be fit. A margin is described by the factors not summed over. Thus list(1:2, 3:4) would indicate fitting the 1,2 margin (summing over variables 3 and 4) and the 3,4 margin in a four-way table. This same model can be specified using the names of the variables (e.g., list(c("V1", "V2"), c("V3", "V4"))), or using formula notation, as in margins = ~V1:V2 + V3:V4. When formula notation is used, the argument frequency can be included as the dependent variable (as in margins = frequency~V1:V2 + V3:V4).
nmes
vector of variable names appearing exactly as the variable names appear in the matrix or data frame to be analyzed (subsequent to the call to get.margins.Loglin).

VALUE:

a list containing two items: 1) nmarg, a vector containing the margins to be fitted, separated by a single zero, and 2) iy, the column number of the dependent variable in the matrix or data frame.

DETAILS:

This is an internal routine and is not usually called directly by users.

SEE ALSO:

, , .