Overview (LOGLINEAR command)
LOGLINEAR is a general procedure for model fitting,
hypothesis testing, and parameter estimation for any model that has
categorical variables as its major components. As such, LOGLINEAR subsumes
a variety of related techniques, including general models of multiway
contingency tables, logit models, logistic regression on categorical
variables, and quasi-independence models.
LOGLINEAR models cell frequencies using the multinomial
response model and produces maximum likelihood estimates of parameters
by means of the Newton-Raphson algorithm 1. HILOGLINEAR,
which uses an iterative proportional-fitting algorithm, is more efficient
for hierarchical models, but it cannot produce parameter estimates
for unsaturated models, does not permit specification of contrasts
for parameters, and does not display a correlation matrix of the parameter
estimates.
Comparison of the GENLOG and LOGLINEAR Commands
The General Loglinear Analysis and Logit Loglinear Analysis dialog
boxes are both associated with the GENLOG command.
In previous releases, these dialog boxes were associated with the LOGLINEAR command.
The LOGLINEAR command is now available only as a
syntax command. The differences are described below.
Distribution Assumptions
-
GENLOGcan handle both Poisson and multinomial distribution assumptions for observed cell counts. -
LOGLINEARassumes only multinomial distribution.
Approach
-
GENLOGuses a regression approach to parameterize a categorical variable in a design matrix. -
LOGLINEARuses contrasts to reparameterize a categorical variable. The major disadvantage of the reparameterization approach is in the interpretation of the results when there is a redundancy in the corresponding design matrix. Also, the reparameterization approach may result in incorrect degrees of freedom for an incomplete table, leading to incorrect analysis results.
Contrasts and Generalized Log-Odds Ratios (GLOR)
-
GENLOGdoesn’t provide contrasts to reparameterize the categories of a factor. However, it offers generalized log-odds ratios (GLOR) for cell combinations. Often, comparisons among categories of factors can be derived fromGLOR. -
LOGLINEARoffers contrasts to reparameterize the categories of a factor.
Deviance Residual
-
GENLOGcalculates and displays the deviance residual and its normal probability plot in addition to the other residuals. -
LOGLINEARdoes not calculate the deviance residual.
Factor-by-Covariate Design
- When there is a factor-by-covariate term in the design,
GENLOGgenerates one regression coefficient of the covariate for each combination of factor values. The estimates of these regression coefficients are calculated and displayed. -
LOGLINEARestimates and displays the contrasts of these regression coefficients.
Partition Effect
- In
GENLOG, the term partition effect refers to the category of a factor. - In
LOGLINEAR, the term partition effect refers to a particular contrast.
Options
Model Specification. You can specify the model or models
to be fit using the DESIGN subcommand.
Cell Weights. You can specify cell weights, such as structural
zeros, for the model with the CWEIGHT subcommand.
Output Display. You can control the output display with
the PRINT subcommand.
Optional Plots. You can produce plots of adjusted residuals
against observed and expected counts, normal plots, and detrended
normal plots with the PLOT subcommand.
Linear Combinations. You can calculate linear combinations
of observed cell frequencies, expected cell frequencies, and adjusted
residuals using the GRESID subcommand.
Contrasts. You can indicate the type of contrast desired
for a factor using the CONTRAST subcommand.
Criteria for Algorithm. You can control the values of algorithm-tuning
parameters with the CRITERIA subcommand.
Basic Specification
The basic specification is two or more variables that define the crosstabulation. The minimum and maximum values for each variable must be specified in parentheses after the variable name.
By default, LOGLINEAR estimates the saturated
model for a multidimensional table. Output includes the factors or
effects, their levels, and any labels; observed and expected frequencies
and percentages for each factor and code; residuals, standardized
residuals, and adjusted residuals; two goodness-of-fit statistics
(the likelihood-ratio chi-square and Pearson’s chi-square); and estimates
of the parameters with accompanying z values and 95% confidence
intervals.
Limitations
- A maximum of 10 independent (factor) variables
- A maximum of 200 covariates
Subcommand Order
- The variables specification must come first.
- The subcommands that affect a specific model must be placed before
the
DESIGNsubcommand specifying the model. - All subcommands can be used more than once and, with the exception
of the
DESIGNsubcommand, are carried from model to model unless explicitly overridden. - If the last subcommand is not
DESIGN,LOGLINEARgenerates a saturated model in addition to the explicitly requested model(s).