BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Crystal_F
Quartz | Level 8

Hi,

I wonder if there is any easy way to modify my code below to generate 95% CI associated with the column percentage in each cell. 

 

proc tabulate data=test2 missing noseps;

class score_cat  Age65_lst1yr cat_avg_ip ;

class cat_race_re Cat_raceeth ;

table score_cat,(all Age65_lst1yr*cat_avg_ip*cat_race_re Age65_lst1yr*cat_avg_ip*Cat_raceeth)*(n*f=comma8. colPctN*f=4.1);

run;

All variables above are categorical ones with multiple levels. Any suggestion would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Not in Tabulate for any of PCTN, COLPCTN, ROWPCTN or PAGEPCTN statistics. The statistics LCLM and UCLM for confidence limits may only be applied to VAR variables, or in other words, numeric variables that appear on a VAR statement.

 

So you need different data.

Or a different procedure that will produce confidence limits of proportions such as SURVEYFREQ to create the data of the summary desired and then display that data with a report procedure.

 


@Crystal_F wrote:

Hi,

I wonder if there is any easy way to modify my code below to generate 95% CI associated with the column percentage in each cell. 

 

proc tabulate data=test2 missing noseps;

class score_cat  Age65_lst1yr cat_avg_ip ;

class cat_race_re Cat_raceeth ;

table score_cat,(all Age65_lst1yr*cat_avg_ip*cat_race_re Age65_lst1yr*cat_avg_ip*Cat_raceeth)*(n*f=comma8. colPctN*f=4.1);

run;

All variables above are categorical ones with multiple levels. Any suggestion would be greatly appreciated!


 

View solution in original post

2 REPLIES 2
ballardw
Super User

Not in Tabulate for any of PCTN, COLPCTN, ROWPCTN or PAGEPCTN statistics. The statistics LCLM and UCLM for confidence limits may only be applied to VAR variables, or in other words, numeric variables that appear on a VAR statement.

 

So you need different data.

Or a different procedure that will produce confidence limits of proportions such as SURVEYFREQ to create the data of the summary desired and then display that data with a report procedure.

 


@Crystal_F wrote:

Hi,

I wonder if there is any easy way to modify my code below to generate 95% CI associated with the column percentage in each cell. 

 

proc tabulate data=test2 missing noseps;

class score_cat  Age65_lst1yr cat_avg_ip ;

class cat_race_re Cat_raceeth ;

table score_cat,(all Age65_lst1yr*cat_avg_ip*cat_race_re Age65_lst1yr*cat_avg_ip*Cat_raceeth)*(n*f=comma8. colPctN*f=4.1);

run;

All variables above are categorical ones with multiple levels. Any suggestion would be greatly appreciated!


 

Crystal_F
Quartz | Level 8
That is very helpful! Thanks for your inputs!

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 460 views
  • 1 like
  • 2 in conversation