Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: p-value for CMH

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 04-27-2022 01:16 PM
(2949 views)

Is there a SAS procedure to calculate p-value for Mantel-Haenszel Stratum Weighted Method for risk difference in stratified samples? It provided the CI but I can't find p-value for this test.

SAS code I used is

ods output CommonPdiff=CommonPdiff ;

**proc** **freq** data = resp order=data;

tables stratum1*stratum2*trt01pn*resp/riskdiff(common) ;

**run**;

I can't find option from

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_freq_details.htm

Many thanks

10 REPLIES 10

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You can do this by taking a model-based approach. Fit a logistic model that includes your treatment variable and your stratifying variables and include an LSMEANS statement with the DIFF option to compare the treatments. For example, assuming that your binary response variable is Y with values 0 and 1, where 1 represents the event of interest:

```
proc logistic;
class trt strat1 strat2 / param=glm;
model y(event="1") = trt strat1 strat2;
lsmeans trt / ilink diff cl;
run;
```

You might also want to look at the discussion in this note which is more important when you want to estimate as well as test the risk difference. That note shows how it can be estimated as either the marginal effect of treatment or as a difference of LS-means.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Try add CMH option in TABLE.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks.

There are 3 p-values, which one I should use?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

This three P value correspond to three Hypothesis .

It look like trt01pn and resp have correlation/association after adjusting MUTCAT and HGBCAT .

But these three Hypothesis has nothing to do with RISK . the second statistic is saying the two treat(trt01pn) has different response(resp) . But is more like ANOVA not like RISK .

Or could you also try RELRISK option ?

It look like trt01pn and resp have correlation/association after adjusting MUTCAT and HGBCAT .

But these three Hypothesis has nothing to do with RISK . the second statistic is saying the two treat(trt01pn) has different response(resp) . But is more like ANOVA not like RISK .

Or could you also try RELRISK option ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Ksharp,

Thank you for your patience and help. I added the option, but still no p-value. It is very strange no p-value but CI for MH test.

ods output CommonPdiff=CommonPdiff CMH=cmhpval ;

proc freq data = resp order=data;

tables mutcat*hgbcat*trt01pn*resp/riskdiff(common) cmh RELRISK ;

run;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

If you don't want to take the model-based approach I mentioned earlier, then you can use the COMMONRISKDIFF(TEST) option in PROC FREQ. If you want to test the risk difference, then you don't want the RELRISK option which gives the ratio of risks, not the difference.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks.

Does proc logistic also create the risk difference p value?

Best,

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Yes, the DIFF option in the LSMEANS statement gives a p-value for the difference. The downside with the model-based approach is that you might encounter problems fitting the model particularly if the data are made sparse by the model specification.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Or you could check CI ?

For RISKDIFF ,check if CI contains 0 .

For RELRISK ,check if CI contains 1 .

For RISKDIFF ,check if CI contains 0 .

For RELRISK ,check if CI contains 1 .

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I had already used logistic regression, need this more sensitivity analysis.

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

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.