@Jonas3007 wrote:
Hello,
I have a few questions (Completely new to SAS) I have the following table.
|
Outcome
|
|
Treatment
|
Recurring UTI
|
No new UTI
|
Total
|
Cranberry Juice
|
8
|
42
|
50
|
Lactobacillus drink
|
19
|
30
|
49
|
Control
|
18
|
32
|
50
|
1. Question about percentages. I need to convert each value into their respective percentages and get the chi-square. what would be the steps to create this table in SAS (exactly as it shows) and then make the same table but showing the values in percentages? I tried using proc freq but it just shows me the percentage of the total column.
2. from this table, how can I get the chi-square?
3. Finally, how do I make a graph to compare these percents?
Thank you!
Whenever you discuss percentage you must define what the denominator and numerator are for the calculation. Which you don't do. So, what are the denominators and numerators.
Without an actual data set it is hard to write code.
Without seeing the code you attempted we have no idea what may or may not have been done.
And many people new to SAS whose "training" came from working with spreadsheets often have separate variables (columns, rows) such as "recurring" and "new" instead of a single variable possibly named "outcome" with two levels of values.
Can you provide an example of your data? Either in the form of a data step or at least proc print or similar output?