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.
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
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.
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
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
Thanks! This was very helpful.
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 16. Read more here about why you should contribute and what is in it for you!
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.