Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pronabesh
Fluorite | Level 6

Hi SAS Users,

I am conducting an analysis that requires comparing mean differences between a population vs. a subset of the sample population. For example, let us assume that we are looking at test scores from different states in the USA. What I am looking to compare is the weighted mean across the whole of USA vs. mean for Massachusetts. The issue is that t-test (paired or unpaired) is not appropriate as Massachusetts scores contribute to the weighted mean across USA. Any suggestions and/or appropriate resourceswill be much appreciated.

Best,

Pronabesh

1 ACCEPTED SOLUTION

Accepted Solutions
pronabesh
Fluorite | Level 6

I found the solution in Peter Westfall's book "Multiple comparisons and multiple tests". We can use analysis of mean to compare the above mentioned. Such comparisons are similar to comparisons with controls, in that there are fewer comparisons; but they differ in that there is no prespecified control. Instead the comparison is with the overall average, which is computed as a weighted average of individual means, the weight for each being inversely proportional to the variance. This analysis is known as "Analysis of Means" or ANOM.

proc glm data=have;

class group;

model outcome=group;

lsmeans group/tdiff=anom;

run;

In case anyone finds this interesting!

View solution in original post

2 REPLIES 2
pronabesh
Fluorite | Level 6

I found the solution in Peter Westfall's book "Multiple comparisons and multiple tests". We can use analysis of mean to compare the above mentioned. Such comparisons are similar to comparisons with controls, in that there are fewer comparisons; but they differ in that there is no prespecified control. Instead the comparison is with the overall average, which is computed as a weighted average of individual means, the weight for each being inversely proportional to the variance. This analysis is known as "Analysis of Means" or ANOM.

proc glm data=have;

class group;

model outcome=group;

lsmeans group/tdiff=anom;

run;

In case anyone finds this interesting!

msxas90
Fluorite | Level 6

Thank you very much for the reference provided and sas codes. It is very helpful. Do you know any alternatives to this command for binary outcomes? For example, if we want to know whether people with knee pain at baseline were more likely to reply to the follow-up questionnaire. Then we have the total population at baseline and subset of responders. Outcome is binary (knee pain y/n).

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 8405 views
  • 1 like
  • 2 in conversation