BookmarkSubscribeRSS Feed
Scottcom4
Calcite | Level 5
Good Afternoon,

Does anyone know how to calculate 2 standard deviations of a variable within a dataset?

Thank you in advance. Message was edited by: Scottcom4
2 REPLIES 2
Paige
Quartz | Level 8
If you mean doing the std dev calculations entirely within a data step, I'm tempted to say its possible, but probably not worth the effort. PROC MEANS is much easier.
Doc_Duke
Rhodochrosite | Level 12
If what you want is to add the 2SD to the dataset, you can do it easily with an aggregate function in PROC SQL.

Doc

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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