How do you make percent distributions by subgroups with the package  
Survey?

Given a continuous variable X, this command calculates a mean for X.

svymean( ~ X, design=Sdescript, na.rm=T)

If I use cut() to create a factor, Xcat out of X, this command gives a  
percent distribution.

svymean( ~ Xcat, design=Sdescript, na.rm=T)

This command give means of X by sex.

svyby( ~ X, ~sex, design=Sdescript, svymean, na.rm=T)

But this command, issued in hopes of percent distributions by sex,  
gives and error.

svyby( ~ Xcat, ~sex, design=Sdescript, svymean, na.rm=T)

The ultimate objective here is to get percent distributions and  
standard errors for subgroup factors like sex=(M,F) by urban/ 
rural=(U,R) for factors from a stratified cluster survey.

/Wilbur Hadden 
	[[alternative HTML version deleted]]

