Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

* artifical binary response data;

options linesize=64 pagesize=48 nodate;

data summary;
input treatment response total @@;
datalines;
0 4 20
1 8 20
;
run;

data individual;
input treatment response @@;
datalines;
0 1 0 1 0 1 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0
;
run;

* binomial analysis of summary data;


proc genmod data=summary;
model response / total = treatment
/ link=logit dist=binomial ;
run;

proc genmod data=summary;


model response / total =
/ link=logit dist=binomial ;
run;
* binomial analysis of individual data;
proc genmod data=individual;
model response = treatment
/ link=logit dist=binomial ;
run;

proc genmod data=individual;


model response =
/ link=logit dist=binomial ;
run;

The SAS System 1

The GENMOD Procedure

Model Information

Data Set WORK.SUMMARY


Distribution Binomial
Link Function Logit
Response Variable (Events) response
Response
Response Variable (Trials) total

Number of Observations Read 2


Number of Observations Used 2
Number of Events 12
Number of Trials 40

Criteria For Assessing Goodness Of Fit

Criterion DF Value Value/DF

Deviance 0 0.0000 .
Scaled Deviance 0 0.0000 .
Pearson Chi-
Chi-Square 0 0.0000 .
Scaled Pearson X2 0 0.0000 .
Log Likelihood -23.4683
Algorithm converged.

Analysis Of Parameter Estimates

Standard Wald 95% Chi-


Chi-
Parameter DF Estimate Error Confidence Limits Square

Intercept 1 -1.3863 0.5590 -2.4819 -0.2906 6.15

Analysis Of Parameter
Estimates

Parameter
Parameter Pr > ChiSq

Intercept 0.0131

The SAS System 2

The GENMOD Procedure

Analysis Of Parameter Estimates

Standard Wald 95% Chi-


Chi-
Parameter DF Estimate Error Confidence Limits Square

treatment 1 0.9808 0.7217 -0.4337 2.3953 1.85


Scale 0 1.0000 0.0000 1.0000 1.0000

Analysis Of Parameter
Estimates

Parameter Pr > ChiSq

treatment 0.1741
Scale

NOTE: The scale parameter was held fixed.


The SAS System 3

The GENMOD Procedure

Model Information

Data Set WORK.SUMMARY


Distribution Binomial
Link Function Logit
Response Variable (Events) response
Response Variable (Trials) total

Number of Observations Read 2


Number of Observations Used 2
Number of Events 12
Number of Trials 40

Criteria For Assessing Goodness Of Fit

Criterion DF Value Value/DF

Deviance 1 1.9326 1.9326


Scaled Deviance
Deviance 1 1.9326 1.9326
Pearson Chi-
Chi-Square 1 1.9048 1.9048
Scaled Pearson X2 1 1.9048 1.9048
Log Likelihood -24.4346

Algorithm converged.

Analysis Of Parameter Estimates

Standard Wald 95% Chi-


Chi-
Parameter DF Estimate Error Confidence Limits Square

Intercept 1 -0.8473 0.3450 -1.5235 -0.1710 6.03

Analysis Of Parameter
Estimates

Parameter Pr > ChiSq

Intercept 0.0141

The SAS System 4

The GENMOD Procedure

Analysis Of Parameter Estimates

Standard Wald 95% Chi-


Chi-
Parameter DF Estimate Error Confidence Limits Square

Scale 0 1.0000 0.0000 1.0000 1.0000

Analysis Of Parameter
Estimates

Parameter Pr > ChiSq

Scale

NOTE: The scale parameter was held fixed.

The SAS System 5

The GENMOD Procedure

Model Information

Data Set WORK.INDIVIDUAL


Distribution Binomial
Link Function Logit
Dependent Variable response

Number of Observations Read 40


Number of Observations Used 40
Number of Events 28
Number of Trials 40
Response Profile

Ordered Total
Value response Frequency

1 0 28
2 1 12

PROC GENMOD is modeling the probability that response='0'. One


way to change this to model the probability that response='1'
is to specify the DESCENDING option in the PROC statement.

Criteria For Assessing Goodness Of Fit

Criterion DF Value Value/DF


Value/DF

Deviance 38 46.9366 1.2352


Scaled Deviance 38 46.9366 1.2352
Pearson Chi-
Chi-Square 38 40.0000 1.0526
Scaled Pearson X2 38 40.0000 1.0526
1.0526
Log Likelihood -23.4683

Algorithm converged.

The SAS System 6

The GENMOD Procedure

Analysis Of Parameter Estimates

Standard Wald 95% Chi-


Chi-
Parameter DF Estimate Error Confidence Limits Square

Intercept 1 1.3863 0.5590 0.2906 2.4819 6.15


treatment 1 -0.9808 0.7217 -2.3953 0.4337 1.85
Scale 0 1.0000
1.0000 0.0000 1.0000 1.0000
Analysis Of Parameter
Estimates

Parameter Pr > ChiSq

Intercept 0.0131
treatment 0.1741
Scale

NOTE: The scale parameter was held fixed.

The SAS System 7

The GENMOD Procedure

Model Information

Data Set WORK.INDIVIDUAL


WORK.INDIVIDUAL
Distribution Binomial
Link Function Logit
Dependent Variable response

Number of Observations Read 40


Number of Observations Used 40
Number of Events 28
Number of Trials 40

Response Profile

Ordered Total
Value response Frequency

1 0 28
2 1 12

PROC GENMOD is modeling the probability that response='0'. One


way to change this to model the probability that response='1'
is to specify the DESCENDING option
option in the PROC statement.
Criteria For Assessing Goodness Of Fit

Criterion DF Value Value/DF

Deviance 39 48.8691 1.2531


Scaled Deviance 39 48.8691
48.869 1 1.2531
Pearson Chi-
Chi-Square 39 40.0000 1.0256
Scaled Pearson X2 39 40.0000 1.0256
Log Likelihood -24.4346

Algorithm converged.

The SAS System 8

The GENMOD Procedure

Analysis Of Parameter Estimates

Standard Wald 95% Chi-


Chi-
Parameter DF Estimate Error Confidence Limits Square

Intercept
Intercept 1 0.8473 0.3450 0.1710 1.5235 6.03
Scale 0 1.0000 0.0000 1.0000 1.0000

Analysis Of Parameter
Estimates

Parameter Pr > ChiSq

Intercept 0.0141
Scale

You might also like