BookmarkSubscribeRSS Feed
HelenLi
Calcite | Level 5

Greetings,

 

I want to assess the association between EmergencyVisitDueToInfection vs. Temperature. My question is how I can control age and gender in the model, please?

 

Table 1 is Emergency Visit per row per patient.

Table 2 is Daily temperature (per row per date).

I created table 3 which contains: my dependent variable Infection-Count per date, my independent variable temperature per date. I also want to include age-related or gender-related variable in table 3 before I feed the PROC GENMOD Poisson Model. However, I am not sure what kind format of gender/age I should create in table 3, so I can control age/gender confounders in PROC GENMOD.

 

Table 1:
ID  Date           Age  Gender Infection (1=Yes, 0=No) 
1   2018-01-01   20     M           1  
2   2018-01-01   30     F            0 
3   2018-01-02   40     F            1 
4   2018-01-02   50     F            1  

5   2018-01-02   60     M           1 

 

Table 2:

Date              Temperature

2018-01-01         5

2018-01-02       10
......

 

Table 3:
Date             Count of Infection  Temperature
2018-01-01            1                        5
2018-01-02            2                        10
......

 

PROC GENMOD DATA = Table3;

            MODEL CountOfInfection = Temperature  Gender? Age? /Link= Log Disk=P;

RUN;

 

How can I put age and gender in the table 3, please?

 

Thanks a lot,

Helen

 

Many thanks,
Helen

1 REPLY 1
StatDave
SAS Super FREQ

Your response is binary at the individual level (table 1). Simply add the temperature to the individual data and fit a logistic model with temperature, gender, and age as predictors.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1261 views
  • 3 likes
  • 2 in conversation