Hello,
I would like to report the following count data:
| TP | FN | FP | TN |
| 12 | 110 | 14 | 99 |
in a proc report as the following:
| Gold Standard | |||
| + | - | ||
| Result | + | 12 | 14 |
| - | 110 | 99 | |
I am having some difficulty as to how I can manipulate the cells/ add rows. I would think this was a common problem, but I am having difficulty googling it. Below is the SAS code for the dataset:
data ex1; input TP FN FP TN; cards; 12 110 14 99 ; run;
Any suggestions or links to the right direction would be much appreciated,
If you read in your data differently so that each row has only one data point, and a + or - value for Gold Standard, and another + or - value for Result, then you're all set. See http://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=proc&docsetTarget=n1pl56sdqo09...
data have;
input gold_standard $ result $ value;
+ + 12
+ - 110
- + 14
- - 99
;
run;
If you read in your data differently so that each row has only one data point, and a + or - value for Gold Standard, and another + or - value for Result, then you're all set. See http://documentation.sas.com/?cdcId=pgmmvacdc&cdcVersion=9.4&docsetId=proc&docsetTarget=n1pl56sdqo09...
data have;
input gold_standard $ result $ value;
+ + 12
+ - 110
- + 14
- - 99
;
run;
I gave the link to an example that does this.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.