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

Hi everyone,

 

After doing many proc surveyfreq procedures I always use cl(type=logit) to calculate the confidence intervals in my sample. I ilustrate it as follows,

 

proc surveyfreq 				
	data=have;
	cluster clustervar;
	strata stratavar;
	weight weightvar ;
	tables Varname1*Varname2 /ALPHA=0.1 cv cl(type=LOGIT) nowt row nototal nofreq;
run;

However, I need to calculate the proportion for some variables, so I used the proc surveymeans proceadure as you can see,

proc surveymeans alpha=0.10 mean clmean(type=LOGIT) cv
	data= have;
	domain domainvar;
	cluster clustervar;
	strata stratavar;
	class categoricalvar
var categoricalvar; weight weightvar; run;

The problem is that (type=LOGIT) is not accepted by the proc surveymeans procedure. Is there any way to specify the (type=LOGIT) argument in this procedure?

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Sorry that it was confusing. Yes, for a categorical variable, you can get an analysis of the proportions, but the main point I am trying to make is that the options that are supported in one procedure (SURVEYFREQ) are not necessarily supported by a different procedure (SURVVEYMEANS). I do not see any options in the doc for SURVEYMEANS that change the way that CIs are estimated.

View solution in original post

3 REPLIES 3
Rick_SAS
SAS Super FREQ

In PROC SURVEYFREQ, you are estimating proportions in a cross tab. The CL option specifies what method you want to use to compute an interval estimate of the proportions in the population. The LOGIT option is one of four methods.They apply only to proportions.

 

In SURVEYMEANS, you can estimate quantities such as the mean, total, and quantiles, along with CLs. But the procedure only implements one method for these interval estimates. Thus it doesn't make sense to try to specify any option.

yascm
Fluorite | Level 6

What you say is confusing since SAS documentation specifies the next rule,

 

If you specify the keyword MEAN for a categorical variable, PROC SURVEYMEANS estimates the proportion, or relative frequency, for each level of the categorical variable. If you do not specify any statistic keywords in the PROC SURVEYMEANS statement, the procedure estimates the proportions for levels of the categorical variables, together with their standard errors and confidence limits.

Rick_SAS
SAS Super FREQ

Sorry that it was confusing. Yes, for a categorical variable, you can get an analysis of the proportions, but the main point I am trying to make is that the options that are supported in one procedure (SURVEYFREQ) are not necessarily supported by a different procedure (SURVVEYMEANS). I do not see any options in the doc for SURVEYMEANS that change the way that CIs are estimated.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 825 views
  • 0 likes
  • 2 in conversation