Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Stata equivalent to a specific SAS sub-command cmh scores=table in proc freq


From   Stephen Kay <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: Stata equivalent to a specific SAS sub-command cmh scores=table in proc freq
Date   Thu, 1 Jul 2010 15:20:55 +0100

Title: Stata equivalent to a specific SAS sub-command cmh scores=table in proc freq

I've been asked to replicate in Stata some clinical trial analysis originally conducted in SAS (which I've never possessed).

Basically an ANCOVA model is run first with three factors and one (continuous) covariate. The dependent variable is change in  yscore from baseline to twelve months and the continuous covariate is the baseline value of this yscore. One of the factors is a binary treatment and it is the least squared mean difference between the two treatments together with its CI's that is the main outcome from this analysis. I've replicated these results in Stata. Instead of taking the p value (generated from this ANCOVA model) for this mean difference however the original analysis took it from  a separate SAS command that reads something like:

proc freq data="" noprint;*stratified CMH test;
tables factor1*factor2*treatment*yscorechange / cmh scores=table;
output out=one(keep=p_cmhrms) cmh;
run

I've found out that the sub-command "cmh scores=table" performs what SAS calls a Cochran-Mantel-Haenszel ANOVA (row mean scores) statistic. Does anyone know how to derive this statistic or at least replicate it's p value?

I can get fairly close to replicating it, using an ANOVA command that omits the baseline yscore as a covariate but introducing the interaction between factors 1 and 2. The p value on the treatment factor is then fairly close - mostly accurate to 3 decimal places. To be honest it all seems a little weird - don't know why you would report a p value for a mean difference which itself is derived from another statistic. It would also be slightly less puzzling if the original ANCOVA did not include the baseline yscore as a covariate, given that it plays no part in the CMH test. If anyone could shed light on this too I'm be most appreciative.

Many thanks,

Stephen

DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee.  Access to this message by anyone else is unauthorised.  If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful.  Please immediately contact the sender if you have received this message in error. Thank you.



© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index