GLZ Syntax - Example 4: Factorial Design and Binomial Response
This example illustrates how to analyze a factorial ANOVA design with a Binomial response variable, using the Probit link in the Startup Panel.
You can run this example with the example data file Center2.sta, Binomial distribution and Probit link.
GLZ;
{ Dependent (response) variable; note that the codes for the categories
for the binomial response variable are specified in parentheses; if
no codes are specified, the program will automatically use all distinct
code values in the response variable. }
RESPONSE = SURVIVAL ("NO" "YES");
{ Specification of grouping variables (factors); note that
optional grouping codes (values) are specified to identify
the (selected) groups in the categorical predictors. }
GROUPS = APPEARNC("MIN_BEGN" "GRT_BEGN"
"MIN_MAL" "GRT_MAL")
AGE("UNDER_50" "A_50TO69" "OVER_69")
LOCATION("TOKYO" "BOSTON" "GLAMORGN");
{ Here the bar operator is used to construct the full factorial
design for the categorical predictor variables; the bar operator
will evaluate to all main effects and interactions between the
grouping variables; because of the @ operator (@2) only the main
effects and interactions up to degree 2 (i.e., up to and including the
2-way interactions) are generated. }
DESIGN = APPEARNC | AGE | LOCATION @2;
{ Variable Frequncy contains the counts for the table specified in the grouping (categorical predictor) variables, i.e., data file Center2.sta contains aggregated (already tabulated) data. }
COUNTV = FREQUNCY;
For more examples, see GLZ Syntax Examples.