Professional Documents
Culture Documents
Exercise 9.1
Exercise 9.1
Refer to Table 7.1 on high school students’ use of alcohol, cigarettes, and marijuana. Consider
the data as matched triplets.
a. Construct the marginal distribution for each substance. Specify a marginal model that can
compare them and explain how to interpret its parameters. State the hypothesis of marginal
homogeneity in terms of model parameters.
c. Construct a data file to fit the marginal model. (Hint: You could mimic the Abortion data file,
ignoring gender.) Use GEE methods to fit the model and to test the hypothesis of marginal
homogeneity.
Table 7.1
Solution: Exercise 9.1
Yes No
No 44 456 500
No Yes 3 43 46
No 2 279 281
A) The sample proportion of students who used alcohol (A) is calculated below:
1449+ 500
=0.86
2276
The sample proportion of students who used cigarettes (C) is calculated below:
1449+ 43
=0.66
2276
The sample proportion of students who used Marijuana (M) is calculated below:
960
=0.42
2276
logit [ P ( Y t =1 ) ]= β1 z 1+ β 2 z2 + β 3 z 3
Here, z 1=1
If t =1
And, z 2=1
If t = 2
And, z 3=1
If t = 3
H 0 : β 1=β 2=β 3
C) To fit generalized estimating equations approach (Marginal Model) in SAS, use PROC
GENMOD. First, write the referred table in SAS editor window where female is denoted
by 1, Ause (Alcohol yes) is denoted by 1, Cuse (Cigarette yes) is denoted by 1, and Muse
Use ‘data’ keyword to assign a filename to the data file in SAS editor window. By using
“input” statement, introduce all variables and their data types. The SAS code for entering
The data is analyzed for 32 cases. The binary response is Marijuana status of 32 people
who are categorized under white and other. Here, explanatory variables are race, Ause,
Cuse, gender, and Count. Now, use PROC GENMOD to implement GEE approach on
data. The ‘class’ and the ‘model’ statement will specify the model of the data. The
‘repeated’ statement invokes GEE approach and ‘subject’ must be the case numbers
because each and every observation is individual. For exchangeable working correlation
use “type = exch” and use “covb” to dislay covariance matrix. The SAS code for PROC