Hi,
I am using fixed effects with logistic regression for three observations per person. In my data there are three rows for each person. I have two questions.
My first question is if my code below is correct? Outcome is dichotomized with 0 as a reference and exposure is three months averaged continuous variable. Covariates are age in 11 categories, ses is socioeconomic status in three categories, married is dichotomized, humid_3mon is three month averaged humidity as continuous variable and so is temp_3mon (temperature) . I have not added continuous variables in the CLASS statement as it takes forever to run the code.
proc logistic data= analysis;
class ses(ref='1') married(ref='1')/ param=ref;
model outcome(ref='0') = exposure age ses married temp_3mon humid_3mon/ expb;
strata id;
run;
My second question is, if I am adding confounders at different steps (step 1, only ses as a covariate, and in step 1, ses + married as covariates) do I need to list both covariates in the CLASS statement from step 1? I have given a syntax for both steps to show what I am trying to ask.
Step 1, I want to add only ses as a covariate in MODEL along with age and weather parameters. But I have listed married in the CLASS statement which I will test in step 2.
proc logistic data= analysis;
class ses(ref='1') married(ref='1')/ param=ref;
model outcome(ref='0') = exposure age ses temp_3mon humid_3mon/ expb;
strata id;
run;
Step 2,
proc logistic data= analysis;
class ses(ref='1') married(ref='1')/ param=ref;
model outcome(ref='0') = exposure age ses married temp_3mon humid_3mon/ expb;
strata id;
run;
Hi,
Thank for the reply!
I have several covariates and have missing values. In my actual model, I didn't list them all in the CLASS statement from the first step. I have added them in the CLASS statement in a model where I am controlling for them. My thinking behind was, some of the covariates added in the last steps might not be a strong confounder but due to missing values these might limit the power if I put them in the CLASS statement from the beginning. But then I got a comment that, sample population is different at each step when all the covariates are not listed in the CLASS statement in the first step.
In my results, I clearly see that at each step when I add covariates risk estimate doesn't change much but in the last step confidence intervals became wider.
I just want to be sure if what I am doing is correct.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.