BookmarkSubscribeRSS Feed
areich
Calcite | Level 5

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

1 REPLY 1
Rick_SAS
SAS Super FREQ

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 941 views
  • 0 likes
  • 2 in conversation