Thank you so much for your prompt response. There are 23 sites in this study which I believe is a good number.
Please, are there reasons you think 'site' should be a fixed rather than random effect?
How would one fit a fixed or random effect in the conditional logistic regression model?
Please, find below my SAS codes for conditional logistic regression and the conditional negative binomial regression.
Thank you.
/****conditional logistic regression************/
proc logistic data = Avera_matched_data ;
CLASS telemed_use(DESC);
model vasopressors_24h(event='1') = telemed_use ;
strata subclass;
ODS OUTPUT PARAMETERESTIMATES=vaso_24hrs ODDSRATIOS=lgsodds;
BY _Imputation_;
title " Model of need for vasopressor within first 24hrs by telemed ";
run;
PROC MIANALYZE PARMS(CLASSVAR=CLASSVAL)=vaso_24hrs;
CLASS telemed_use;
MODELEFFECTS telemed_use;
ODS OUTPUT PARAMETERESTIMATES=vaso_24hrs2;
RUN;
*** Log-transform odds ratio estimates
and obtain standard error from confidence intervals ***;
DATA lgsodds_t; SET lgsodds(WHERE=(INDEX(EFFECT,"telemed_use")));
log_or_lr_value=LOG(ODDSRATIOEST);
log_or_lr_se=(LOG(UPPERCL)-LOG(LOWERCL))/(2*1.96);
RUN;
*** Combine transformed estimates;
PROC MIANALYZE DATA=lgsodds_t;
ODS OUTPUT PARAMETERESTIMATES=mian_lgsodds_t;
MODELEFFECTS log_or_lr_value;
STDERR log_or_lr_se;
RUN;
*** Back-transform combined values;
DATA mian_lgsodds_bt; SET mian_lgsodds_t;
Estimate_back = EXP(ESTIMATE); *Pooled odds ratio;
LCL_back=Estimate_back*EXP(-1.96*STDERR); *Pooled lower limit;
UCL_back=Estimate_back*EXP(+1.96*STDERR); *Pooled upper limit;
RUN;
proc print data=mian_lgsodds_bt;run;
/*****Conditional Negative binomial regression********************/
proc genmod data=Avera_matched_data descending;
class subclass telemed_use(DESC) age2(desc);
model Hospital_free_days4= telemed_use totalbeds EDVolume_2019 age2
/ dist=negbin ;
repeated sub=subclass /type=cs corrw covb printmle;
lsmeans telemed_use / diff exp cl;
ODS OUTPUT ParameterEstimates=Hosp_free2;
BY _Imputation_;
title " Model of 28-day hospital free days by telemed";
run;
PROC MIANALYZE PARMS(CLASSVAR=LEVEL)=Hosp_free2;
CLASS telemed_use ;
MODELEFFECTS telemed_use totalbeds EDVolume_2019 age2;
ODS OUTPUT PARAMETERESTIMATES=Hosp_new2;
RUN;
... View more