BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mjkop56
Obsidian | Level 7

I am trying to determine if there is a significant linear trend over time in the proportion of males. This post is very helpful, and the suggestion to use a logistic regression with gender as the outcome and year as the predictor:

 

https://communities.sas.com/t5/Statistical-Procedures/Test-for-significant-difference-in-proportion-...

 

I have some of the same people who are found in different years (but not in the same year). Can I use the same set up, or does the logit model need to be modified?

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello,

 

You could consider fitting a GEE model in PROC GENMOD and using TYPE=AR or MDEP(1) to examine the estimated correlation between adjacent observations.

GEEs = Generalized Estimating Equations 

GEEs should cope with having data that are correlated in clusters.

 

Generalized Estimating Equations

https://support.sas.com/rnd/app/stat/topics/gee/gee.pdf

 

Cheers,

Koen

View solution in original post

4 REPLIES 4
sbxkoenk
SAS Super FREQ

Hello,

 

See the answers of @PGStats and @SteveDenham in this post : 

 

Testing Trend in Proportion Over Time
Posted 06-25-2020 04:42 PM
https://communities.sas.com/t5/Statistical-Procedures/Testing-Trend-in-Proportion-Over-Time/td-p/665...

 

Test your errors for autocorrelation if you use a regression modelling approach!!

 

Koen

mjkop56
Obsidian | Level 7

Thanks, I'm trying to figure our how to test for autocorrelation with a logistic regression.

I have individual level data, for example, and the outcome (gender) does not change within a person.

ID  year  gender

1    2005    M

1    2006    M

1    2007    M

2    2005    F

3    2006    M

3    2007    M

3    2008    M

 

Could a model with cluster robust standard errors fix the issue (with same person in multiple yrs), or does one need to go to a random intercept or random coefficient model?

 

 

sbxkoenk
SAS Super FREQ

Hello,

 

You could consider fitting a GEE model in PROC GENMOD and using TYPE=AR or MDEP(1) to examine the estimated correlation between adjacent observations.

GEEs = Generalized Estimating Equations 

GEEs should cope with having data that are correlated in clusters.

 

Generalized Estimating Equations

https://support.sas.com/rnd/app/stat/topics/gee/gee.pdf

 

Cheers,

Koen

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 663 views
  • 3 likes
  • 2 in conversation