On 26/8/08 9:40 AM, Doran, Harold wrote:
Computing the mean of the item by itself with svymeans agrees with the
sample mean

mean(lower_dat$W524787, na.rm=T)
[1] 0.8555471

Compare this to the value in the row 9 up from the bottom to see it is
different.

You might be omitting more cases due to missing values than you expect.
Does the following calculation give you the same results as in rr1?

mean( lower_dat$W524787[ apply( lower_dat[lset], 1,
    function(x) !any(is.na(x)) ) ] )


James
--
James Reilly
Department of Statistics, University of Auckland
Private Bag 92019, Auckland, New Zealand

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to