BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Rick_SAS
SAS Super FREQ

With respect, the arithmetic average p-value is a meaningless quantity. It has no useful interpretation that I am aware of. 

 

To give an example, suppose for 19 models, the p-value is 0.01. For the 20th model, the p-value is 0.99. The average of those values is ~0.059, but that value does not mean anything because it is not the result of a statistical test.

DomUk
Fluorite | Level 6
yes that is right, however in my data, the pvalues are almost the same. So it might be okay in this case.
DomUk
Fluorite | Level 6

I have one small more question.

For the same 20 years I calculated descriptive statistics using the following code:

proc means data=... N  Mean min p1 p25 Median p75 p99 max std;
var x1 ..... x21;
by year;
output out=desk_stat mean()= p1()= p25()= median()= p75()= p99()= std()= /autoname;
run;

In the second step I calculated again the mean of the 20 years:

proc means data=desk_stat mean;
output out = mylib.desk_stat_EV;
run;

After the first step I get a very nice picture in the result window. I would like to get such a table (columns show the statistics and row the variables) for my output.

I think I have to use a transform step, but Iam not exactly sure how I can handle it.

 

Thanks again!

FreelanceReinh
Jade | Level 19

The statistic-keywords in the PROC MEANS statement control the output in the Output window (listing output) or Results Viewer (HTML), independently of the statistics for the output dataset requested in the OUTPUT statement. In your second PROC MEANS step you don't specify statistics in the OUTPUT statement (and use no VAR statement either) so that the output dataset will contain a default set of statistics (N, min, max, mean, std) for all numeric variables: five rows with one statistic per row. You can obtain an output dataset with columns Variable, Mean, ... (other statistics as specified in the PROC MEANS statement) ... by using an ODS OUTPUT statement in conjunction with the STACKODSOUTPUT option of the PROC MEANS statement. For example:

proc means data=desk_stat(drop=_:) mean std stackodsoutput;
ods output summary=want;
run;

proc print data=want;
run;

 

FreelanceReinh
Jade | Level 19

@DomUk wrote:
yes that is right, however in my data, the pvalues are almost the same. So it might be okay in this case.

Indeed, certain conclusions are valid. For example:

mean(of p1-p20)<=0.0025 implies max(of p1-p20)<=0.05,
mean(of p1-p20)> 0.9525 implies min(of p1-p20)> 0.05.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 19 replies
  • 2762 views
  • 8 likes
  • 4 in conversation