Power for odds ratio

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Power for odds ratio

D.R. Wahlgren
Gang,
I have several 2x2 comparisons.  I've computed odds ratios and 95%
CIs using the crosstabs procedure (SPSS v13 for Mac).  We'd like to
report power estimates, since our sample sizes were small and likely
underpowered.

1) Cohen's power analysis text has a chapter on chi square analyses
but does not mention odds ratios.  Can I use the same computations
even though I'm reporting ORs instead of chi squares?  That is, is
power the same for significance of a chi square as it is for an odds
ratio having a 95% CI that does not include 1.0?


2) I see that I can obtain a contingency coefficient as an option in
the statistics options for the crosstab.  Is this the Pearson
contingency coefficient C  that Cohen provides an equation to convert
to the effect size w?

thanks!
_d
--
Dennis R. Wahlgren, M.A.

Center for Behavioral Epidemiology and Community Health
San Diego State University
http://www.cbeach.org


"Poets say science takes away from the beauty of the stars--mere
globs of gas atoms.  Nothing is 'mere.'  I too can see the stars on a
desert night, and feel them.  But do I see less or more?"
--Richard Feynman
Reply | Threaded
Open this post in threaded view
|

Re: Power for odds ratio

Marta Garcia-Granero
Hi Dennis

You can use SAMPLES.EXE, a freeware program included in PEPI 4.0. It's
quite easy to use. Also, there is a prgram (also freeware) called GPOWER

You can download PEPI (IBM&compatible computers, run in DOS) at:
http://www.sagebrushpress.com/pepibook.html

And GPOWER (runs in Mac) from:
http://www.psycho.uni-duesseldorf.de/aap/projects/gpower/

A very different topic: the convenience of reporting "post-hoc" power
analysis has been discussed a lot and general consensus idea is: don't
do it. Take a look at these links:

•Steve Simon (Children's Mercy Hospital)
http://www.childrens-mercy.org/stats/size/posthoc.asp
•Post-hoc power: Don’t do it.
http://www.pubhealth.ku.dk/~bxc/SDC-courses/power.pdf
<http://www.pubhealth.ku.dk/%7Ebxc/SDC-courses/power.pdf>
•TWO SAMPLE-SIZE PRACTICES THAT I DON’T RECOMMEND
http://www.stat.uiowa.edu/~rlenth/Power/2badHabits.pdf
<http://www.stat.uiowa.edu/%7Erlenth/Power/2badHabits.pdf>
•Some Practical Guidelines for Effective Sample-Size Determination
http://www.stat.uiowa.edu/techrep/tr303.pdf*
<http://www.stat.uiowa.edu/techrep/tr303.pdf>*

Regards,
Marta Garcia-Granero

> I have several 2x2 comparisons. I've computed odds ratios and 95%
> CIs using the crosstabs procedure (SPSS v13 for Mac). We'd like to
> report power estimates, since our sample sizes were small and likely
> underpowered.
>
> 1) Cohen's power analysis text has a chapter on chi square analyses
> but does not mention odds ratios. Can I use the same computations
> even though I'm reporting ORs instead of chi squares? That is, is
> power the same for significance of a chi square as it is for an odds
> ratio having a 95% CI that does not include 1.0?
>
> 2) I see that I can obtain a contingency coefficient as an option in
> the statistics options for the crosstab. Is this the Pearson
> contingency coefficient C that Cohen provides an equation to convert
> to the effect size w?
>
Reply | Threaded
Open this post in threaded view
|

Re: Power for odds ratio

Hashmi, Syed S
In reply to this post by D.R. Wahlgren
Hi Listers,

Just a slight digression from the actual topic here but something in the
post made me think...  Dennis wrote:

>
> Gang,
> I have several 2x2 comparisons.  I've computed odds ratios and 95%
> CIs using the crosstabs procedure (SPSS v13 for Mac).  We'd like to
> report power estimates, since our sample sizes were small and likely
> underpowered.
>

If I'm not mistaken, the statistic that you get in crosstabs is Risk
Ratio rather than odds ratio.  Is that correct?? (I could well be wrong
here)

I know that they'd approximate for rare events but if Risk is the
statistic obtained via crosstabs, is there a way to obtain ORs and their
corresponding 95% CIs in crosstab? Or by some other method?  I know that
it is possible if you run a univariate regression but is there any other
way?

Thanks.

- Shahrukh
Reply | Threaded
Open this post in threaded view
|

Re: Power for odds ratio

Marta Garcia-Granero
Hi Shahrukh

SPSS gives BOTH odds-ratio and relative risk (with their 95%CI). Of
course, you can also use logistic regression to get OR, adjusted for
confounding factors, but for univariate analysis CROSSTABS is quite
fast&simple.

See the following example:

DATA LIST FREE/Diet HDL frecuency (3 F8).
BEGIN DATA
1 1 6 1 2 4 2 1 1 2 2 19
END DATA.
WEIGHT BY frecuency.
VAR LAB Diet 'Diet group' / HDL 'HDL levels'.
VAL LAB Diet 1 'Standard' 2 'Experimental' /HDL 1 '<40' 2 '>40' .
VAR LEV Diet HDL (NOMINAL).

CROSSTABS
/TABLES= Diet BY HDL
/FORMAT= AVALUE TABLES
/STATISTIC=CHISQ RISK
/CELLS= COUNT ROW.

First row in last table (Risk Estimate) will give you the odds-ratio (of
low HDL levels associated to standard diet compared to the experimental
diet). The second row gives the RR (of low HDL... blah, blah, blah...),
and the third row gives the RR for the other value of the outcome
variable (High HDL levels risk, not very useful really,unless your data
are code code upside down and the outcome of interest is coded as last
value instead of first value).

Regards,
Marta Garcia-Granero

> Just a slight digression from the actual topic here but something in the
> post made me think...  Dennis wrote:
>
>> I have several 2x2 comparisons.  I've computed odds ratios and 95%
>> CIs using the crosstabs procedure (SPSS v13 for Mac).  We'd like to
>> report power estimates, since our sample sizes were small and likely
>> underpowered.
> If I'm not mistaken, the statistic that you get in crosstabs is Risk
> Ratio rather than odds ratio.  Is that correct?? (I could well be wrong
> here)
>
> I know that they'd approximate for rare events but if Risk is the
> statistic obtained via crosstabs, is there a way to obtain ORs and their
> corresponding 95% CIs in crosstab? Or by some other method?  I know that
> it is possible if you run a univariate regression but is there any other
> way?
>
> Thanks.
>
> - Shahrukh
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Power for odds ratio

Hashmi, Syed S
Marta,

Thanks for your reply.  I know that if you do the Risk Estimate, the
output table says that the results listed are odds ratios (OR).  But if
you do a simple cross-multiplication, you'll notice that the results
(and the corresponding confidence intervals) do not out the OR but
rather the relative risk (RR).

I realized this when I noticed that ORs that I'd calculated from 2x2s in
Excel were slightly off from the ones in the SPSS crosstab.  Upon
investigation I realized that the "ODDS RATIOS" listed in the crosstab
output are RR and not OR.

Just to give you an idea, a 2x2 table with cell counts of 12, 1208, 16
and 3250 for a,b,c and d respectively (some numbers from my dataset)
gives the following OR and RR (with 95% CI):

OR: 2.19 (0.99 - 4.81)
RR: 2.17 (1.05 - 4.51).

The RR will always have a tighter CI and although it doesn't make a huge
difference for the point estimate, the interpretation based on the CI
might get affected.

This was the reason I was asking if there was a pure OR calculator in
SPSS other than performing a regression.

- Shahrukh


> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
Of

> Marta Garcia-Granero
> Sent: Friday, October 05, 2007 1:07 PM
> To: [hidden email]
> Subject: Re: Power for odds ratio
>
> Hi Shahrukh
>
> SPSS gives BOTH odds-ratio and relative risk (with their 95%CI). Of
> course, you can also use logistic regression to get OR, adjusted for
> confounding factors, but for univariate analysis CROSSTABS is quite
> fast&simple.
>
> See the following example:
>
> DATA LIST FREE/Diet HDL frecuency (3 F8).
> BEGIN DATA
> 1 1 6 1 2 4 2 1 1 2 2 19
> END DATA.
> WEIGHT BY frecuency.
> VAR LAB Diet 'Diet group' / HDL 'HDL levels'.
> VAL LAB Diet 1 'Standard' 2 'Experimental' /HDL 1 '<40' 2 '>40' .
> VAR LEV Diet HDL (NOMINAL).
>
> CROSSTABS
> /TABLES= Diet BY HDL
> /FORMAT= AVALUE TABLES
> /STATISTIC=CHISQ RISK
> /CELLS= COUNT ROW.
>
> First row in last table (Risk Estimate) will give you the odds-ratio
(of
> low HDL levels associated to standard diet compared to the
experimental
> diet). The second row gives the RR (of low HDL... blah, blah,
blah...),
> and the third row gives the RR for the other value of the outcome
> variable (High HDL levels risk, not very useful really,unless your
data
> are code code upside down and the outcome of interest is coded as last
> value instead of first value).
>
> Regards,
> Marta Garcia-Granero
> > Just a slight digression from the actual topic here but something in
the
> > post made me think...  Dennis wrote:
> >
> >> I have several 2x2 comparisons.  I've computed odds ratios and 95%
> >> CIs using the crosstabs procedure (SPSS v13 for Mac).  We'd like to
> >> report power estimates, since our sample sizes were small and
likely
> >> underpowered.
> > If I'm not mistaken, the statistic that you get in crosstabs is Risk
> > Ratio rather than odds ratio.  Is that correct?? (I could well be
wrong
> > here)
> >
> > I know that they'd approximate for rare events but if Risk is the
> > statistic obtained via crosstabs, is there a way to obtain ORs and
their
> > corresponding 95% CIs in crosstab? Or by some other method?  I know
that
> > it is possible if you run a univariate regression but is there any
other
> > way?
> >
> > Thanks.
> >
> > - Shahrukh
> >
> >
Reply | Threaded
Open this post in threaded view
|

Re: Power for odds ratio

Marta Garcia-Granero
Hi again

> Thanks for your reply.  I know that if you do the Risk Estimate, the
> output table says that the results listed are odds ratios (OR).  But if
> you do a simple cross-multiplication, you'll notice that the results
> (and the corresponding confidence intervals) do not out the OR but
> rather the relative risk (RR).

You must be doing something wrong, because the odds-ratio presented by
SPSS is indeed an OR, and the RR is indeed a RR.
> I realized this when I noticed that ORs that I'd calculated from 2x2s in
> Excel were slightly off from the ones in the SPSS crosstab.  Upon
> investigation I realized that the "ODDS RATIOS" listed in the crosstab
> output are RR and not OR.

Again, check your formula, because I did the same with my students
(compute OR and 95% asymptotic CI by hand and with SPSS) and the results
obtained were the same.

> Just to give you an idea, a 2x2 table with cell counts of 12, 1208, 16
> and 3250 for a,b,c and d respectively (some numbers from my dataset)
> gives the following OR and RR (with 95% CI):
>
> OR: 2.19 (0.99 - 4.81)
> RR: 2.17 (1.05 - 4.51).
>
a=12
b=1208
c=16
d=3250

OR=ad/bc=(12·3250)/(1208·16)=2.0178 ---> 2.02

RR=[a/(a+b)]/[c/(c+d)]=(12/1220)/(16/3266)=2.0078  --> 2.01

There must be something wrong with your data, because my hand calculations give different results (but in aggrement with those obtained with SPSS):

data list list/row col freq (3 F8).
begin data
1 1   12
1 2 1208
2 1   16
2 2 3250
end data.
weight by freq.

CROSSTABS
  /TABLES=row  BY col
  /FORMAT= AVALUE TABLES
  /STATISTIC=RISK
  /CELLS= COUNT
  /COUNT ROUND CELL .

Using Logistic regression:

* We need the outcome value to be the last, not the first as in Crosstabs *.
TEMPORARY.
RECODE col (2=0).
LOGISTIC REGRESSION VARIABLES  col
  /METHOD = ENTER row
  /CONTRAST (row)=Indicator
  /PRINT = CI(95).

Logistic regression output says that the OR=2.018 (like my hand
calculations and SPSS Crosstab output).



> The RR will always have a tighter CI and although it doesn't make a huge
> difference for the point estimate, the interpretation based on the CI
> might get affected.
>
> This was the reason I was asking if there was a pure OR calculator in
> SPSS other than performing a regression.
>
> - Shahrukh
>
>
>
>> -----Original Message-----
>> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
>>
> Of
>
>> Marta Garcia-Granero
>> Sent: Friday, October 05, 2007 1:07 PM
>> To: [hidden email]
>> Subject: Re: Power for odds ratio
>>
>> Hi Shahrukh
>>
>> SPSS gives BOTH odds-ratio and relative risk (with their 95%CI). Of
>> course, you can also use logistic regression to get OR, adjusted for
>> confounding factors, but for univariate analysis CROSSTABS is quite
>> fast&simple.
>>
>> See the following example:
>>
>> DATA LIST FREE/Diet HDL frecuency (3 F8).
>> BEGIN DATA
>> 1 1 6 1 2 4 2 1 1 2 2 19
>> END DATA.
>> WEIGHT BY frecuency.
>> VAR LAB Diet 'Diet group' / HDL 'HDL levels'.
>> VAL LAB Diet 1 'Standard' 2 'Experimental' /HDL 1 '<40' 2 '>40' .
>> VAR LEV Diet HDL (NOMINAL).
>>
>> CROSSTABS
>> /TABLES= Diet BY HDL
>> /FORMAT= AVALUE TABLES
>> /STATISTIC=CHISQ RISK
>> /CELLS= COUNT ROW.
>>
>> First row in last table (Risk Estimate) will give you the odds-ratio
>>
> (of
>
>> low HDL levels associated to standard diet compared to the
>>
> experimental
>
>> diet). The second row gives the RR (of low HDL... blah, blah,
>>
> blah...),
>
>> and the third row gives the RR for the other value of the outcome
>> variable (High HDL levels risk, not very useful really,unless your
>>
> data
>
>> are code code upside down and the outcome of interest is coded as last
>> value instead of first value).
>>
>> Regards,
>> Marta Garcia-Granero
>>
>>> Just a slight digression from the actual topic here but something in
>>>
> the
>
>>> post made me think...  Dennis wrote:
>>>
>>>
>>>> I have several 2x2 comparisons.  I've computed odds ratios and 95%
>>>> CIs using the crosstabs procedure (SPSS v13 for Mac).  We'd like to
>>>> report power estimates, since our sample sizes were small and
>>>>
> likely
>
>>>> underpowered.
>>>>
>>> If I'm not mistaken, the statistic that you get in crosstabs is Risk
>>> Ratio rather than odds ratio.  Is that correct?? (I could well be
>>>
> wrong
>
>>> here)
>>>
>>> I know that they'd approximate for rare events but if Risk is the
>>> statistic obtained via crosstabs, is there a way to obtain ORs and
>>>
> their
>
>>> corresponding 95% CIs in crosstab? Or by some other method?  I know
>>>
> that
>
>>> it is possible if you run a univariate regression but is there any
>>>
> other
>
>>> way?
>>>
>>> Thanks.
>>>
>>> - Shahrukh
>>>
>>>
>>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Power for odds ratio

Hashmi, Syed S
Marta,

My apologies, I had a typo in my email.  The value for cell "a" was
supposed to be 13 and not 12. Based on this:

a=13
b=1208
c=16
d=3250

OR=ad/bc=(13*3250)/(1208*16)=2.185948 ---> 2.19
RR=[a/(a+b)]/[c/(c+d)]=(13/1221)/(16/3266)=2.173321  --> 2.17

I had obtained these numbers from a dataset of mine.  I ran the
crosstabs in SPSS and I realize that I had misunderstood your original
post which mentioned that the first line of the crosstab "risk estimate"
output was OR and the other two were RRs.  I had assumed that the first
was the OR and the last one was the reciprocal OR (changing case/control
status).  However, that was not adding up in my hand calculations, which
had led to my query.

Thanks though, it's much clearer now. I should remember not to rush
through the posts. :)



> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
Of
> Marta Garcia-Granero
> Sent: Saturday, October 06, 2007 4:53 AM
> To: [hidden email]
> Subject: Re: Power for odds ratio
>
> Hi again
>
> > Thanks for your reply.  I know that if you do the Risk Estimate, the
> > output table says that the results listed are odds ratios (OR).  But
if
> > you do a simple cross-multiplication, you'll notice that the results
> > (and the corresponding confidence intervals) do not out the OR but
> > rather the relative risk (RR).
>
> You must be doing something wrong, because the odds-ratio presented by
> SPSS is indeed an OR, and the RR is indeed a RR.
> > I realized this when I noticed that ORs that I'd calculated from
2x2s in
> > Excel were slightly off from the ones in the SPSS crosstab.  Upon
> > investigation I realized that the "ODDS RATIOS" listed in the
crosstab
> > output are RR and not OR.
>
> Again, check your formula, because I did the same with my students
> (compute OR and 95% asymptotic CI by hand and with SPSS) and the
results
> obtained were the same.
>
> > Just to give you an idea, a 2x2 table with cell counts of 12, 1208,
16

> > and 3250 for a,b,c and d respectively (some numbers from my dataset)
> > gives the following OR and RR (with 95% CI):
> >
> > OR: 2.19 (0.99 - 4.81)
> > RR: 2.17 (1.05 - 4.51).
> >
> a=12
> b=1208
> c=16
> d=3250
>
> OR=ad/bc=(12*3250)/(1208*16)=2.0178 ---> 2.02
>
> RR=[a/(a+b)]/[c/(c+d)]=(12/1220)/(16/3266)=2.0078  --> 2.01
>
> There must be something wrong with your data, because my hand
calculations
> give different results (but in aggrement with those obtained with
SPSS):

>
> data list list/row col freq (3 F8).
> begin data
> 1 1   12
> 1 2 1208
> 2 1   16
> 2 2 3250
> end data.
> weight by freq.
>
> CROSSTABS
>   /TABLES=row  BY col
>   /FORMAT= AVALUE TABLES
>   /STATISTIC=RISK
>   /CELLS= COUNT
>   /COUNT ROUND CELL .
>
> Using Logistic regression:
>
> * We need the outcome value to be the last, not the first as in
Crosstabs

> *.
> TEMPORARY.
> RECODE col (2=0).
> LOGISTIC REGRESSION VARIABLES  col
>   /METHOD = ENTER row
>   /CONTRAST (row)=Indicator
>   /PRINT = CI(95).
>
> Logistic regression output says that the OR=2.018 (like my hand
> calculations and SPSS Crosstab output).
>
>
>
> > The RR will always have a tighter CI and although it doesn't make a
huge
> > difference for the point estimate, the interpretation based on the
CI
> > might get affected.
> >
> > This was the reason I was asking if there was a pure OR calculator
in
> > SPSS other than performing a regression.
> >
> > - Shahrukh
> >
> >
> >
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion [mailto:[hidden email]] On
Behalf

> >>
> > Of
> >
> >> Marta Garcia-Granero
> >> Sent: Friday, October 05, 2007 1:07 PM
> >> To: [hidden email]
> >> Subject: Re: Power for odds ratio
> >>
> >> Hi Shahrukh
> >>
> >> SPSS gives BOTH odds-ratio and relative risk (with their 95%CI). Of
> >> course, you can also use logistic regression to get OR, adjusted
for

> >> confounding factors, but for univariate analysis CROSSTABS is quite
> >> fast&simple.
> >>
> >> See the following example:
> >>
> >> DATA LIST FREE/Diet HDL frecuency (3 F8).
> >> BEGIN DATA
> >> 1 1 6 1 2 4 2 1 1 2 2 19
> >> END DATA.
> >> WEIGHT BY frecuency.
> >> VAR LAB Diet 'Diet group' / HDL 'HDL levels'.
> >> VAL LAB Diet 1 'Standard' 2 'Experimental' /HDL 1 '<40' 2 '>40' .
> >> VAR LEV Diet HDL (NOMINAL).
> >>
> >> CROSSTABS
> >> /TABLES= Diet BY HDL
> >> /FORMAT= AVALUE TABLES
> >> /STATISTIC=CHISQ RISK
> >> /CELLS= COUNT ROW.
> >>
> >> First row in last table (Risk Estimate) will give you the
odds-ratio

> >>
> > (of
> >
> >> low HDL levels associated to standard diet compared to the
> >>
> > experimental
> >
> >> diet). The second row gives the RR (of low HDL... blah, blah,
> >>
> > blah...),
> >
> >> and the third row gives the RR for the other value of the outcome
> >> variable (High HDL levels risk, not very useful really,unless your
> >>
> > data
> >
> >> are code code upside down and the outcome of interest is coded as
last
> >> value instead of first value).
> >>
> >> Regards,
> >> Marta Garcia-Granero
> >>
> >>> Just a slight digression from the actual topic here but something
in
> >>>
> > the
> >
> >>> post made me think...  Dennis wrote:
> >>>
> >>>
> >>>> I have several 2x2 comparisons.  I've computed odds ratios and
95%
> >>>> CIs using the crosstabs procedure (SPSS v13 for Mac).  We'd like
to
> >>>> report power estimates, since our sample sizes were small and
> >>>>
> > likely
> >
> >>>> underpowered.
> >>>>
> >>> If I'm not mistaken, the statistic that you get in crosstabs is
Risk

> >>> Ratio rather than odds ratio.  Is that correct?? (I could well be
> >>>
> > wrong
> >
> >>> here)
> >>>
> >>> I know that they'd approximate for rare events but if Risk is the
> >>> statistic obtained via crosstabs, is there a way to obtain ORs and
> >>>
> > their
> >
> >>> corresponding 95% CIs in crosstab? Or by some other method?  I
know

> >>>
> > that
> >
> >>> it is possible if you run a univariate regression but is there any
> >>>
> > other
> >
> >>> way?
> >>>
> >>> Thanks.
> >>>
> >>> - Shahrukh
> >>>
> >>>
> >>>
> >
> >