[R] svychisq

From: Moss, Angela (Dudley PCT) <Angela.Moss_at_dudley.nhs.uk>
Date: Fri, 18 May 2007 13:38:51 +0100


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

In addition: Warning messages:

  1. is.na() applied to non-(list or vector) in: is.na(rowvar)
  2. is.na() applied to non-(list or vector) in: is.na(colvar)

The dietperception data set does have some NA's where as there are none in dietstatus.  

The table is

svytable(~dietperception+dietstatus,dudleyls1rake)  

dietstatus

dietperception                            Good          OK
Poor           Very Poor      Unclassified

  Perceive healthy                       6669.15287  6306.38635
47563.49174 80030.97096 12340.28453

  Neither agree not disagree 250.68278 204.88193 6086.84308 35575.32925 2158.47668

  Perceive unhealthy                   0.00000      171.49710
2075.80230 26390.92946 318.73213
  Don't know                               0.00000        22.33107
334.44880      4402.99293    562.91532

 

I wondered if you could give me any idea where I am gong wrong.  

Many thanks

Angela    

Dr Angela Moss
Public Health Information Analyst
Dudley PCT
St. John's House
Union Street
Dudley
DY2 8PP

Tel: 01384 366091
Fax: 01384 366485  

        [[alternative HTML version deleted]]



R-help_at_stat.math.ethz.ch 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. Received on Fri 18 May 2007 - 12:43:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 May 2007 - 17:31:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.