Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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 <stephen.kay@adelphigroup.com>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index