BookmarkSubscribeRSS Feed
ybz12003
Rhodochrosite | Level 12

Hello,

I used two different methods to get two different results in the subgroups. I would like to compare whether these two methods are the same in each group (ATR/FYH/YRU/TRG).  The Method_1 and Method_2 values in the sample dataset could be referred to as any statical value, (mean, sum, etc.) Please guild me to approach it; thanks.

 

data Sensitivity;
   infile datalines dsd;
   input Sub_Group : $10.  Method_1 Method_2;
   datalines;
   ATR,   ,  261483.06,
   FYH, 732878.49, 762531.35, 
   YRU, 323238.54, 49796.91,
   TRG, 404592.55, 329885.45
;

 

 

2 REPLIES 2
StatDave
SAS Super FREQ
You need to have the raw data that went into the computation of the statistics and then use that data with an appropriate procedure depending on what aspect of the group distributions you want to compare. If you want to compare a location measure computed for the groups (such as mean or median), then you could use the Kruskal-Wallis test in PROC NPAR1WAY which doesn't require that the raw values have a particular distribution like the normal distribution. See the examples in the NPAR1WAY documentation. If you want to compare something other than a location measure, then be specific about what you want.
ballardw
Super User

@ybz12003 wrote:

Hello,

I used two different methods to get two different results in the subgroups. I would like to compare whether these two methods are the same in each group (ATR/FYH/YRU/TRG).  The Method_1 and Method_2 values in the sample dataset could be referred to as any statical value, (mean, sum, etc.) Please guild me to approach it; thanks.

 

data Sensitivity;
   infile datalines dsd;
   input Sub_Group : $10.  Method_1 Method_2;
   datalines;
   ATR,   ,  261483.06,
   FYH, 732878.49, 762531.35, 
   YRU, 323238.54, 49796.91,
   TRG, 404592.55, 329885.45
;

The type of "statistic" would likely be critical to making any defendable "comparison".

 

Example for wanting to compare sums:

 

One record with FYH method_1 value = 732878.49

Several thousand records for FYH method_2 with the sum happening to be 732878.49. What sort of comparison seems valuable? Identical sum but what does that actually tell you about what the source data looks like?

 

Pick a value for a mean. I can generate multiple collections of values that have the same mean but the likely would not make much sense to compare to the given value you pick. 

 

One suspects that you not providing much of the detail here. Going directly to comparing final summary statistics with some other information is likely not a very reliable approach.

 

Two sets of data consisting of observations, especially if each method has similar or identical inputs, is a completely different story. Then you can test for identity/similarity of means and dispersion.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 937 views
  • 0 likes
  • 3 in conversation