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

Good afternoon all, I hope everyone is having a great day. I am writing because I am working with cross-sectional complex survey data and generating a log-binomial model (for prevalence ratios). The default statistical test used for each regression term is a Z statistic. Since this is a sample (without the assumption of population normality) I want to generate t statistics (or F statistics) for each term instead. How do I accomplish this? Below is an example of my code.

 

PROC GENMOD data=Cancer;
CLASS Cluster Stratum;
MODEL Kidney (event='1') = BMI Gluc
/ d=binomial link=log;
TITLE 'Model 1';
WEIGHT Weight;

REPEATED SUBJECT = Cluster (Stratum);
RUN;

 

I appreciate any help you can provide. Thanks, and have a great rest of the day.

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

The parameter tests produced for a GEE model in PROC GENMOD are large-sample Wald (Z) tests. If you particularly want to use t-tests instead, then you can simply use the PROBT function in the DATA step with the statistic value and the error degrees of freedom as arguments. For example, the following produces the t-test p-value for the Smoke predictor in the GEE example in the Getting Started section of the GENMOD documentation. 

 

data _null_;
p = 1-probt(-0.2036,60);
put p=;
run;

The result is shown in the log. 

30     data _null_;
31     p = probt(-0.2036,60);
32     put p=;
33     run;

p=0.4196775261
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ

If you have survey data you should not use PROC GENMOD. Only the survey procedures have the variance estimators necessary for a proper analysis of survey data. Unfortunately, there is no survey procedure that will fit a log binomial model, but you could use PROC SURVEYLOGISTIC for fitting a logistic model to binary response data.

RTurpin
Fluorite | Level 6

Thank you so much for the information. If I were using unweighted, unstratified, unclustered data (which has none of the complex survey data parameters) how would I go about reporting a t or F test for regression terms in a sample in PROC GENMOD (instead of the default Z test)?

 

Thanks,

Rod Turpin

StatDave
SAS Super FREQ

The parameter tests produced for a GEE model in PROC GENMOD are large-sample Wald (Z) tests. If you particularly want to use t-tests instead, then you can simply use the PROBT function in the DATA step with the statistic value and the error degrees of freedom as arguments. For example, the following produces the t-test p-value for the Smoke predictor in the GEE example in the Getting Started section of the GENMOD documentation. 

 

data _null_;
p = 1-probt(-0.2036,60);
put p=;
run;

The result is shown in the log. 

30     data _null_;
31     p = probt(-0.2036,60);
32     put p=;
33     run;

p=0.4196775261
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

RTurpin
Fluorite | Level 6

Thanks! This was very helpful.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 4 replies
  • 2231 views
  • 0 likes
  • 2 in conversation