Gay Marriage Logistic Regression Example

Free Syntax to cut-and-paste!

set width=80/length=none/header=no/messages=none.
get file="/homes/josephf/webstats/CCFRpop.sav".
set width=80/length=none/header=no/messages=none.
get file="/homes/josephf/webstats/CRIC2002.sav".
*Missing values
missing values q7 (99)
missing values q44 (99)
missing values AGE (888)
missing values Q42 (99)
*Recodes
recode q7 (1,2=1)(3,4=0)
recode q44 (5=0)(4=1)(3=2)(2=3)(1=4)
recode Q42 (1 thru 3=1) (4,5=2) (6 thru 8=3)
*Value labels
value labels q7 1'Support' 0'Oppose'
value labels AGE 3'old' 2'middle' 1'young'
value labels q42 1'basic' 2'intermediate' 3'high'
*Regression
LOGISTIC REGRESSION /VARIABLES q7 WITH q44 q42 age
finish.


Output:

      Total number of cases:      1402 (Unweighted)
Number of selected cases: 1402
Number of unselected cases: 0

Number of selected cases: 1402
Number rejected because of missing data: 129
Number of cases included in the analysis: 1273



Dependent Variable Encoding:

Original Internal
Value Value
0 0
1 1

Dependent Variable.. Q7 7. Do you strongly support, support, oppose or
strongly oppose allowing gay and lesbian couples to marry?

Beginning Block Number 0. Initial Log Likelihood Function

-2 Log Likelihood 1724.7748

* Constant is included in the model.


Beginning Block Number 1. Method: Enter

Variable(s) Entered on Step Number
1.. Q44 44. Other than events like weddings and funerals, how often
do you attend a religious service?
Q42 42. What is the highest level of education you have reached?
AGE 41. Age?

Estimation terminated at iteration number 3 because
Log Likelihood decreased by less than .01 percent.

-2 Log Likelihood 1493.279
Goodness of Fit 1273.759

Chi-Square df Significance

Model Chi-Square 231.496 3 .0000
Improvement 231.496 3 .0000

Classification Table for Q7
Predicted
Oppose Support Percent Correct
O | S
Observed +--------+--------+
Oppose O | 262 | 262 | 50.00%
+--------+--------+
Support S | 137 | 612 | 81.71%
+--------+--------+
Overall 68.66%

---------------------- Variables in the Equation -----------------------

Variable B S.E. Wald df Sig R Exp(B)

Q44 -.4433 .0429 106.7756 1 .0000 -.2465 .6419
Q42 .2436 .0771 9.9786 1 .0016 .0680 1.2758
AGE -.0290 .0041 50.5643 1 .0000 -.1678 .9714
Constant 1.9060 .2700 49.8276 1 .0000


BACK