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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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