BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ddormer
Obsidian | Level 7

I am using Surveyfreq for one-way and two-way tables.  I'm interested in the row percentages and particularly the standard deviation of those row percentages.  I have two issues/questions:

 

1)  The documentation says the default columns are:

  • Frequency
  • Weighted frequency
  • Standard deviation of weighted frequency
  • Percent
  • Standard error of percent.

(plus the additional columns for the Row option).

 

However, instead of "Standard deviation of weighted frequency," I see "standard error of weighted frequency."  Why does my table show Std Err Wgt Freq instead of Std Dev Wgt Freq?  How do I get to the standard deviation?

 

2)  What option do I need to get to the standard deviation of the weighted row percentages?

 

Here are the relevant section of code and a sample of a table.

 


Proc surveyfreq data=SCM_SORT;
weight _LLCPWT;
Tables _STATE*GHSTATUS/row chisq(secondorder);
ODS Output CrossTabs=Freqout1;
Format GHSTATUS status.;
run;

 

Surveyfreq table.JPG

 

Thanks in advance for your assistance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Note that the documentation says:

If you request a frequency or crosstabulation table without specifying options, PROC SURVEYFREQ produces the following for each table level or cell:

 

Since you include the options ROW and Chisq you are specifying options. Try adding the CL option and see if that helps.

 

Sometimes you may need to run multiple procecure calls with different table options to get what you want.

View solution in original post

2 REPLIES 2
ballardw
Super User

Note that the documentation says:

If you request a frequency or crosstabulation table without specifying options, PROC SURVEYFREQ produces the following for each table level or cell:

 

Since you include the options ROW and Chisq you are specifying options. Try adding the CL option and see if that helps.

 

Sometimes you may need to run multiple procecure calls with different table options to get what you want.

Ddormer
Obsidian | Level 7

Yup, adding CL solved it.  Lesson learned.

 

Thank you @ballardw.

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 2338 views
  • 0 likes
  • 2 in conversation