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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1153 views
  • 3 likes
  • 2 in conversation