Hello - I am new to using proc report. I am trying to figure out how to put multiple group variables in the same column. The task: I have 5 binary exposure variable and 5 binary outcomes. All of which I want stratified by gender. I have gender like this "define gender / group;". So withing gender I want the 5 binary exposure variables stacked on top of each other as grouping variables. All I am interested number-wise is the frequencies of the outcomes by the exposure variables, which is stratified by gender.
Any help would be greatly appreciated! Thanks!
title "Table 2. Survey Response Categories and OA Status for Knee, Hand, Foot, and
Cervical Spine (C-Spine) by Gender and Includes Mean (Standard Deviation)of Age and BMI"; columns H1_SEX H1_Q63 X1_KL_Rhand_CMC X1_KL_Rfoot_MTP X1_KL_Rknee X1_KL_C_spine
H1_AGE1, (mean std) BMI, (mean std)
/*H1_Q64 H1_Q62VAR4 H1_Q62VAR5 H1_Q62VAR6*/; define X1_KL_Rhand_CMC / across order=internal; define X1_KL_Rfoot_MTP / across; define X1_KL_Rknee / across; define X1_KL_C_spine / across; define H1_SEX / group; define H1_Q63 / group; define H1_AGE1 / format=4.1; define BMI / format=4.1; run;
Thank you for the reply. I have SAS code above and attached a picture of the table I am trying to create. I basically want a table that displays all of the 2x2 contingency tables for 5 exposures and 4 outcome variables, stratified by gender. I am able to get the 4 outcome variables to appear correctly. I then group/stratify by age. However, the next step of getting the exposure variables to appear in the same column is the tricky part for me. When I click group, the report is trying to group with-in each group variable and not just with-in gender alone.
Thanks again for the input!
You will get the best and most answers if you also post some sample data which works with your Proc Report. This way people can actually test and verify what they propose and you'll have a good chance to get fully working code as answer.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.