turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- proc survey mean, standard deviation of square roo...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-10-2017 01:23 PM

I am somewhat new to survey analysis. I am running a code for survey sample and want to report the standard deviation, I am getting this big numbers in comparison to an unweighted code, I am pretty sure is something easy I am not looking at,can anyone help?

proc means data=ms19.ms19 MEAN STD STDERR ALPHA=0.05 CLM;;

VAR AGE;

RUN ;

SAS Output

Analysis Variable : AGE Age Mean Std Dev Std Error Lower 95%

CL for Mean Upper 95%

CL for Mean

CL for Mean Upper 95%

CL for Mean

45.8475175 | 13.9318244 | 0.1087396 | 45.6343762 | 46.0606588 |

proc surveymeans data=ms19.ms19 MEAN RMSSTD STDERR ALPHA=0.05 CLM;

strata strat; cluster PSU_ID; weight WEIGHT_PA_IPW_OVERALL;

var AGE;

run;

SAS Output

SAS Output

Data Summary Number of Strata Number of Clusters Number of Observations Sum of Weights

20 |

664 |

16415 |

23413.2548 |

Statistics Variable Label Mean Std Error of Mean 95% CL for Mean Std Dev AGE

Age | 39.867382 | 0.369889 | 39.1410467 | 40.5937167 | 40229 |

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Maria01

02-10-2017 02:37 PM

My initial guess is that you have one or more AGEs that is impossibly high and also has a very high value in the variable you are using to weight the analysis.

Art, CEO, AnalystFinder.com

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to art297

02-13-2017 12:22 PM

Hi Art297,

thank you for your help, I have read up on it and it seems I have a code the is not appropriate. The age range I have is from 45 to 75 years old and have no outliers, and my weight is to adjust for age as well.

it seems the code I need is someting similar to this:

proc means data=xxx n MIN MAX MEAN STD STDERR ALPHA=0.05 CLM;

weight xxx;

BY xxx;

var AGE;

run;

SAS Output

Analysis Variable : AGE Age N Minimum Maximum Mean Std Dev Std Error Lower 95%

CL for Mean Upper 95%

CL for Mean

CL for Mean Upper 95%

CL for Mean

7675 | 45 | 75 | 56.50 | 6.63 | 0.09 | 56.31 | 56.68 |

see the results seem something more realistic.

Thank you.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Maria01

02-17-2017 02:31 PM

PROC SURVEYMEANS does not directly compute the standard deviation for the mean, the reported st. dev. is for the SUM.

You might find this SAS Note useful: http://support.sas.com/kb/45/701.html.