BookmarkSubscribeRSS Feed
LeeGrenon
Calcite | Level 5

I am interested in estimating Spearman correlations with survey data. As I understand, the PROC CORR Spearman option is not valid when a WEIGHT statement is used. I have not seen an option for Spearman correlations in the SURVEY procedures. Any suggestions on how to calculate Spearman correlations and use a survey weight? Ideally, I would like to use the bootstrap weights for estimating the p-value for the Spearman coefficient

1 REPLY 1
AllenMcDowell
SAS Employee


Spearman correlations are equivalent to Pearson correlations between the ranks of two variables and Pearson correlations are functions of totals. Therefore, you can estimate Spearman correlations using PROC SURVEYMEANS and a little programming. The method is described in the book "Model Assisted Survey Sampling" by Sardal, Swensson and Wretman. The essential formula that you will need for correlations is found in exercise 13.1.

There are also two Web Examples available at support.sas.com that demonstrate this method. The Web Examples demonstrate how to estimate the variance of a variable and the standard deviation of a variable; correlations are just an extension of the same idea.

http://support.sas.com/rnd/app/examples/stat/SurveyVariance/new_example/index.html

http://support.sas.com/rnd/app/examples/stat/SurveyStdDev/new_example/index.html

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 7224 views
  • 0 likes
  • 2 in conversation