turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Zelen's test for homogeneity of odds ratio

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-13-2013 05:42 AM

Dear All,

My objective is to validate some weird results coming from the PROC STRATIFY (package Statxact v8) for testing homogeneity of odds ratio:

if you recode the treatment variable (tpattdcr in the piece of code below) in the input dataset ‘Tio 5’ to ‘tio 5’ you get slightly different p-values for the monte carlo estimate of the Zelen’s test (with my dataset 0.96160 and 0.96200)?

PROC STRATIFY DATA=&inds SEED=311875 OUT=&outds;

HO/mo;

RO tpattdcr;

CO censored;

STRATUM trial;

WEIGHT cnt;

RUN;

I have been pleasantly surprised when I found out that since SAS v9.2, there is an option in the PROC FREQ to calculate the monte carlo estimate of the Zelen's test (see Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, Third Edition and the piece of code below). Unfortunately when I tried to run the procedure I got an error message saying that the monte carlo estimation is not available for Zelen's test (that contradicts what is mentioned in the SAS help)?

proc freq data=&inds;

tables trial*tpattdcr*censored;

exact zelen / mc SEED=311875;

WEIGHT cnt;

RUN;

Don’t hesitate to contact me if you need more details.

Best regards,

Cyril

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-13-2013 01:14 PM

This should work for h x 2 x 2 tables (I'm looking at SAS/STAT12.1 documentation), so for h trials, tpattdcr with two levels, and censored with two levels, it should work. If there are more than two levels of tpattdcr, it might be the cause (and it might be the cause of the odd behavior of STRATIFY), as PROC FREQ can get picky about level names.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-13-2013 02:02 PM

Thanks for the prompt response but I've got exactly h x 2 x 2 tables.

Concerning the proc freq, I don't understand why the monte carlo estimation is not working for Zelen's test?

Concerning the proc stratify, I tried to create a numerical variable for treatment coded (0,1) and I get the same result as with the treatment variable in a character coded ("tio 5","placebo") but slightly different from the character variable coded ("Tio 5","placebo")?

Best regards,

Cyril

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-13-2013 02:18 PM

Before opening a ticket with Tech Support (which is what I think this is going to require), make sure that you are running SAS v9.3 (TS1M2) to have access to SAS/STAT 12.1 (even though this should be available in SAS9.2). Try the alias, EQOR, instead of zelen.

proc freq data=&inds;

tables trial*tpattdcr*censored;

exact eqor / mc SEED=311875;

WEIGHT cnt;

RUN;

Basically, this should give you the material that Tech Support will want to know when you contact them.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-14-2013 05:57 AM

Dear Steve,

FYI we've got SAS v9.2 TS level 2M3 installed on the server.

With EQOR, I got exactly the same note:

NOTE: PROC FREQ computes the exact p-value, not a Monte Carlo estimate, for Zelen's test.

Thanks for your help.

Best regards,

Cyrille

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-14-2013 08:56 AM

Hi Cyril,

Now I see what is going on--the documentation regarding the MC option is not really clear:

The MC option is available for all EXACT statistic-options **excep**t the BINOMIAL option and the following options that apply only to 2 x 2 or *h* x 2 x 2 tables: BARNARD, COMOR, EQOR, MCNEM, OR, RELRISK, and RISKDIFF. PROC FREQ computes only exact tests or confidence limits for these statistics.

So, as I now read it, no MC option is available for Zelen's test--only the exact value. When you run the code without the MC option, what value do you obtain for Zelen's test? Does it match what comes from StatXact?

Which still doesn't address the PROC STRATIFY issue of spelling/case changes affecting the results. However, that will be a Cytel issue, I would think.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-14-2013 09:37 AM

Yes it wasn't very clear...

Without the MC option in the PROC FREQ, it matches the results coming from the PROC STRATIFY (with EX option) but I had to input only part of my dataset otherwise I got an error message saying that the sample size was too large (actually this is the point for using the Monte Carlo estimation: sparse data and large sample size... and in the end, for the Zelen's test, it's only available in the PROC STRATIFY).

FYI I have already contacted the Cytel support, I will let you know the outcome.

Thanks again and Have a great weekend!

Cyril

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-17-2013 08:50 AM

I hope that SAS9.4/STAT12.2 adds additional Monte Carlo capabilities to PROC FREQ. It seems rather unusual to provide exact solutions, but not have an alternative for large, sparse datasets of the *h *x 2 x 2 variety.

Steve Denham