BookmarkSubscribeRSS Feed
Ms_Raza
Calcite | Level 5

Hi,

In my data, i have repeated measures from two waves and I used both fixed effects and random effects. I am getting risk estimates in opposite directions. I want to test which method is suitable for my data and I saw on internet and ChatGpt also suggested to use Hausman test but unfortunately I couldn't get much help on how to run/code it.

 

Below is my code, and if anyone can see how to use Husman's test to decide which method to use.

 

Fixed effects: 

 

proc logistic data=analysis1;
class newid sex(ref='1') age_dik region(ref='North') / param=ref;
model anxiety (event='1') = temperature sex age_dik region rain / selection=none;
strata newid;
run;

Random effects:

 

proc genmod data=analysis1 descending;
class sex(ref='1') age_dik region(ref='North') newid;
model anxiety (ref='0') = temperature sex age_dik region rain/ dist=bin link=logit type3;
estimate 'temperature' temperature 1 / exp;
repeated subject=newid / type=exch ;
run;

Thank you for help!

 

 

 

 

2 REPLIES 2
Ksharp
Super User

You need module SAS/ETS.

 

Ksharp_0-1719282299787.png

 

Mike_N
SAS Employee

If possible, it's better to choose your modeling approach based on the goals of the study/analysis, rather than a statistical test. Can you give more information about your data and the question you are trying to answer? 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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