[R] svychisq

Thomas Lumley tlumley at u.washington.edu
Tue May 22 18:23:41 CEST 2007


On Fri, 18 May 2007, Moss, Angela (Dudley PCT) wrote:

> Dear All
>
> I am trying to use svychisq with a two-dimensional table 4 x 5. The
> command I am using is
> summary(svytable(~dietperception+dietstatus,dudleyls1rake,na.rm=TRUE),"C
> hisq")
>
> It is throwing up an error message as follows:
>
> Error in NCOL(y) : only 0's may be mixed with negative subscripts

I can't reproduce this problem at all. I've tried tables with zero cells, 
with and without raking. The na.rm= argument to svytable() can't be 
helping, since svytable() doesn't have an na.rm argument.

Does the same thing happen if you call svychisq() directly rather than via 
summary(svytable())?

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



More information about the R-help mailing list