Hello,

I still apologise if the question i ask is naive. I would like to use R
instead of usual softs (SAS, Stata) or at list to do things that the others
do not. As a consequence I am trying to get familiar with R, and i am
astonished because it does not seem to do things that are easy to do on
other softs.

I have got data with missing values (I am working on a questionnaire filled
by students) and with weights and stratification. I learned how to use the
survey package, and I would like to do an average (by using svymean) of a
variable that has some NA.
I first tried :
svymean(~q135,survey) #q135 is the name of the variable and survey is the
name of the survey design
but as there is missing values, i get that :

     mean SE
q135   NA NA

as a consequence I put the observations without missing values in a vector x
:
x<-na.omit(data$q135)

and I tried to make my average on that vector
svymean(~x,survey)
but I get an error because my weights are constructed on all the sample and
the vector of the weights has 1773 rows (that is the size of the population)
and the variable I want to make an average on has only 1754 rows.

I expect that my explanations are clear enough.

Thanks very much

	[[alternative HTML version deleted]]


