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
- /
- Base SAS Programming
- /
- Confidence intervals for ratio/proportion

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

12-02-2015 10:32 AM

Hi all,

I have a data set containing the following variables of interest:

study id

male_n (number of males with study disease)

male_TotN (total number of males in study)

male_percent (calculated percentage of males with study disease)

female_n (number of females with study disease)

female_TotN (total number of females in study)

female_percent (calculated percentage of females with study disease)

MFR (male-female-ratio (male_percent/female_percent))

What I need to produce is a confidence interval for this MFR and eventually a forest plot, showing these ratios. Since I don’t have the CIs, I haven’t looked at making a forest plot yet, possibly I would be able to figure this out myself. My skill level is very low, unfortunately, so I’m generally not able to make use of the many articles written by SAS professionals for other SAS professionals, though I did try this first.

Thanks for looking

Andreas

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

12-02-2015 11:42 AM

First, use proportions rather than percentages. What you have an an estimate for the ratio of two proportions. What you want is called the confidence interval for the ratio.

One way to do this is to log-transform the ratio, use a standard equation to find the confidence interval, and then exponentiate to transform back. Look up the section of the PROC FREQ doc about odds ratios and relative risks for 2x2 tables. The section "Confidence Limits for the Odds Ratio" explains the math.

If this is what you are looking for, then I suggest you post sample data for 3 or 4 studies. (The data can be fake.) Someone ought to be able to show you how to get the data from the format you have into a format that PROC FREQ requires for analysis.