Generalized Linear Model for Binary Data - Reocities
Generalized Linear Model for Binary Data - Reocities
Generalized Linear Model for Binary Data - Reocities
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Using <strong>Generalized</strong> <strong>Linear</strong> <strong>Model</strong> <strong>for</strong> Dose-response models<br />
The following program features the example on chapter 8 “<strong>Binary</strong> variable and logistic<br />
regression” in Dobson’s book “An Introduction to <strong>Generalized</strong> <strong>Linear</strong> <strong>Model</strong>s”. The data<br />
set includes numbers of insects dead after five hours’ exposure to gaseous carbon<br />
disuphide at various concentrations. There are three variables in the data set: DOSE (logtrans<strong>for</strong>med),<br />
KILLED (number of killed) and N (number of insects).<br />
Using SAS Proc Genmod, several alternative models were fitted to these data:<br />
1. Logistic (with the logit link function)<br />
π<br />
log( ) = β1<br />
+ β 2χ<br />
1−<br />
π<br />
2. Probit (with the inverse cumulative Normal link function Φ -1 )<br />
1<br />
Φ ( ) = β + β χ<br />
−<br />
π 1 2<br />
3. Extreme value (with the complementary log log link function)<br />
log[ − log( 1−<br />
)] = β + β χ<br />
π 1 2<br />
The results from SAS output show that the extreme value model clear provides the best<br />
description of the data based on comparison of predict value with observed value and<br />
based on deviance from SAS output.<br />
Options nodate nonumber;<br />
Title;<br />
<strong>Data</strong> binary;<br />
input dose killed n;<br />
datalines;<br />
1.6907 6 59<br />
1.7242 13 60<br />
1.7552 18 62<br />
1.7842 28 56<br />
1.8113 52 63<br />
1.8369 53 59<br />
1.8610 61 62<br />
1.8839 60 60<br />
;<br />
/* using Logistic model */<br />
proc genmod data=binary;<br />
make 'OBSTATS' out=obstat1;<br />
model killed/n = dose / dist=bin<br />
link=logit<br />
lrci<br />
waldci<br />
obstat;<br />
run;
data obstats1;<br />
set obstat1 (rename=(yvar1=y yvar2=n));<br />
pred1=pred*n;<br />
run;<br />
/* Using Probit model */<br />
proc genmod data=binary;<br />
make 'OBSTATS' out=obstat2;<br />
model killed/n = dose / dist=bin<br />
link=probit<br />
lrci<br />
waldci<br />
obstat;<br />
run;<br />
data obstats2;<br />
set obstat2 (rename=(yvar1=y yvar2=n));<br />
pred2=pred*n;<br />
run;<br />
/* Using extrme value model */<br />
proc genmod data=binary;<br />
make 'OBSTATS' out=obstat3;<br />
model killed/n = dose / dist=bin<br />
link=cll<br />
lrci<br />
waldci<br />
obstat;<br />
run;<br />
data obstats3;<br />
set obstat3 (rename=(yvar1=y yvar2=n));<br />
pred3=pred*n;<br />
run;<br />
data comp;<br />
merge obstats1 obstats2 obstats3;<br />
keep y n pred1 pred2 pred3;<br />
run;<br />
proc print;<br />
title ‘Comparison of various dose-response models <strong>for</strong> the beetle<br />
mortality data’;<br />
run;