Bruce A.
2008-09-18 17:10:05 UTC
Hi all,
I'm trying to analyze a dataset with repeated observations on the same
subject with a dependent variable which is dichotomous. So I used PROC
GENMOD with the repeated statement. However, when I compare that to the
output when I use PROC LOGISTIC (which ignores dependency) I get the same
estimates, the same confidence intervals of those estimates, and therefore
I get the same p-hat values.
Shouldn't I get different answers? Am I using PROC GENMOD wrong? Am I
going crazy?
These are the two codes I used:
proc logistic data = drunks descending;
title "Using Logistic Regression ";
model accident = age vision drivers_ed / stb aggregate scale=none
link=logit;
output out = logistic_fit predprobs=(i);
run;
proc genmod data = drunks descending;
title "Using Genmod type = ind";
class case period;
model accident = age vision drivers_ed / dist=bin link = logit;
repeated subject = case / within=period type =unstr;
output out = genmod_fit_i p=phat;
run;
the dataset looked something like:
case accident age vision drivers_ed period
1 1 17 1 1 1
2 0 44 0 0 1
3 0 35 0 1 1
.
45 0 20 0 1 1
1 1 18 1 1 2
2 1 45 0 0 2
3 0 36 0 1 2
.
45 1 21 0 1 2
Thanks to anyone who has an idea!!!
Cheers,
Bruce A.
I'm trying to analyze a dataset with repeated observations on the same
subject with a dependent variable which is dichotomous. So I used PROC
GENMOD with the repeated statement. However, when I compare that to the
output when I use PROC LOGISTIC (which ignores dependency) I get the same
estimates, the same confidence intervals of those estimates, and therefore
I get the same p-hat values.
Shouldn't I get different answers? Am I using PROC GENMOD wrong? Am I
going crazy?
These are the two codes I used:
proc logistic data = drunks descending;
title "Using Logistic Regression ";
model accident = age vision drivers_ed / stb aggregate scale=none
link=logit;
output out = logistic_fit predprobs=(i);
run;
proc genmod data = drunks descending;
title "Using Genmod type = ind";
class case period;
model accident = age vision drivers_ed / dist=bin link = logit;
repeated subject = case / within=period type =unstr;
output out = genmod_fit_i p=phat;
run;
the dataset looked something like:
case accident age vision drivers_ed period
1 1 17 1 1 1
2 0 44 0 0 1
3 0 35 0 1 1
.
45 0 20 0 1 1
1 1 18 1 1 2
2 1 45 0 0 2
3 0 36 0 1 2
.
45 1 21 0 1 2
Thanks to anyone who has an idea!!!
Cheers,
Bruce A.