The usual MLE sometimes is not appropriate. For example, there may be insufficient sample size for logistic regression, particularly if the data are highly stratified and there are a small number of subjects in each stratum. Highly stratified data often come from a design with cluster sampling, that is designs with tow or more observations for each primary sampling unit or cluster. The appropriate form of logistic regression for these types of data is called conditional logistic regression.
You can fit a model based on conditional probabilities that condition away the random cluster effects, which results in a model that contains substantially fewer parameters. The random cluster effects, e.g., centers in clinical trials, or dealers in auto risk analysis. Those are nuisance parameters.
Since the likelihood conditioned on the discordant pairs, the concordant pairs are non-informative and thus can be ignored. Considering Pr(yi1=0, yi2=1) and Pr(yi1=1, yi2=0), the conditional likelihood for the entire data will reduce. The explanatory variables are the differences in values of the explanatory variables for the treatment and control i.
data trial_test;
drop center1 i_sex1 age1 initial1 improve1 trtsex1 trtinit1
trtage1 isexage1 isexint1 iageint1;
retain center1 i_sex1 age1 initial1 improve1 trtsex1 trtinit1
trtage1 isexage1 isexint1 iageint1 0;
input center treat $ sex $ age improve initial @@;
/* compute model terms for each observation */
i_sex=(sex='m'); i_trt=(treat='t');
trtsex=i_sex*i_trt; trtinit=i_trt*initial;
trtage=i_trt*age; isexage=i_sex*age;
isexinit=i_sex*initial;iageinit=age*initial;
/* compute differences for paired observation*/
if (center=center1) then do;
pair=10*improve + improve1;
i_sex=i_sex1-i_sex;
age=age1-age;
initial=initial1-initial;
trtsex=trtsex1-trtsex;
trtinit=trtinit1-trtinit;
trtage=trtage1-trtage;
isexage=isexage1-isexage;
isexint=isexint1-isexinit;
iageinit=iageint1-iageinit;
if (pair=10 or pair=1) then do;
/* output discordant pair observations */
improve=(pair=1); output trial_test; end;
end;
else do;
center1=center; age1=age;
initial1=initial; i_sex1=i_sex; improve1=improve;
trtsex1=trtsex; trtinit1=trtinit; trtage1=trtage;
isexage1=isexage; isexint1=isexinit; iageint1=iageinit;
end;
cards;
1 t f 27 0 1 1 p f 32 0 2
2 t f 41 1 3 2 p f 47 0 1
3 t m 19 1 4 3 p m 31 0 4
4 t m 55 1 1 4 p m 24 1 3
5 t f 51 1 4 5 p f 44 0 2
6 t m 23 0 1 6 p f 44 1 3
;
proc logistic data=trial descending;
model improve = initial age i_sex isexage isexinit iageinit trtsex trtinit trtage /
selection=forward include=3 details;
run;
And also, you can use proc phreg for conditional logistic regression so that you can operate directly on the actual observations; you don't have to create difference observations.
data trial2;
drop center1 i_sex1 age1 initial1 improve1 trtsex1 trtinit1
trtage1 isexage1 isexint1 iageint1;
retain center1 i_sex1 age1 initial1 improve1 trtsex1 trtinit1
trtage1 isexage1 isexint1 iageint1 0;
input center treat $ sex $ age improve initial @@;
/* compute model terms for each observation */
i_sex=(sex='m'); i_trt=(treat='t');
trtsex=i_sex*i_trt; trtinit=i_trt*initial;
trtage=i_trt*age; isexage=i_sex*age;
isexinit=i_sex*initial;iageinit=age*initial;
cards;
1 t f 27 0 1 1 p f 32 0 2
2 t f 41 1 3 2 p f 47 0 1
3 t m 19 1 4 3 p m 31 0 4
4 t m 55 1 1 4 p m 24 1 3
5 t f 51 1 4 5 p f 44 0 2
6 t m 23 0 1 6 p f 44 1 3
;
proc phreg data=trial2 nosummary;
strata center;
model improve = initial age i_sex i_trt trtsex trtinit trtage isexage isexinit iageinit/ ties=discrete details;
run;
proc logistic data=trial2;
class sex treat / param=ref;
strata center;
model improve = initial age i_sex i_trt trtsex trtinit trtage isexage isexinit iageinit;
run;
No comments:
Post a Comment