07-19-2012 02:27 PM
I am trying to create an output display where I can have the observation, a cost, a code(already entered in as either a 1 or 2), mean, then percentiles from 50 to 100 by 10s. There are about 500 variables in my dataset but I am concerned with the cost and code of the observation. I was already able to calculate all these values but I cannot get them into a table the way I want. The table I want looks like what I have below:
If anyone has any advice on how I can create an output such as the one above, it would be greatly appreciated. Thanks!
07-19-2012 05:40 PM
Give an example, code is best, of how you calculated the values and we'll have a better idea of methods that might work.
Also, MEAN is the 50th PERCENTILE. Are you sure you need two columns for that.
07-19-2012 06:45 PM
What numbers will be used to generate the mean, 50th - 100th percentile? Are you looking to add summarized information to a table by observation or will the stats be summarized within cost and codes? You may also want a count, the 90th percentile of 5 numbers can be useless.
The 50th percentile is different from the mean ballardw (mean vs median) but I'm sure you know that.
07-20-2012 12:25 PM
I'm guessing that your dataset has all the descriptive statistics calculated and stored as variables and the issue is one of displaying them with a numeric value in the column header. I assume that obs is a variable in your dataset. If not, please drop the keyword "noobs" from the PROC PRINT statement and the variable "obs" from the VAR statement: (untested)
proc print data=dataset noobs label;
obs cost code mean p50 p60 p70 p80 p90 p100;
p50 = "50"
p60 = "60"
p70 = "70"
p80 = "80'
p90 = "90"
p100 = "100";