Solved

SAS - Finding the mean and standard deviation in SAS

Posted on 2014-09-23
2
354 Views
Last Modified: 2016-02-13
Experts,

I have 14,00 records which I have calc;ulated a percentage.  How canI calculate the mean percentage of these records and then the standard deviation.  I am not sure if this is correct.  If possible I would like to  select all of those where the standard deviation is greater than 2 times the standard deviation.

I would like to do this in SAS.   Any ideas!!
0
Comment
Question by:morinia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 11

Assisted Solution

by:theartfuldazzler
theartfuldazzler earned 500 total points
ID: 40339335
Hi

Assuming your database is called "dsname" and the percentage variable name is "perc1" then

proc sql;
  create table test2 as
    select * from dsname
	having Perc1 >= mean(Perc1)+2*std(Perc1);

Open in new window

0
 
LVL 11

Accepted Solution

by:
theartfuldazzler earned 500 total points
ID: 40339349
To calculate the mean and std dev use:

proc sql;
  create table test2 as
    select mean(perc1) as MeanPerc, std(Perc1) as StdDevPerc from dsname
;

Open in new window

0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question