Dear Forum

I a running  svychisq from the survey package and get errors with the number
of dimensions,
errors that I do not understand and do not know how to fix.

I ask you kindly to help me out.

The eror message follows with some information below. I hope there are
enough information to help me to fix the problem if not please let me know
what is needed

Best
Stefan Hrafn Jonsson

> QHISQ2 <- svychisq(~S73 + S36 , design = HL7design , statistic  = "Chisq")
Error in design$variables[, as.character(rows)] :
  incorrect number of dimensions




HL07 <- read.spss("C:/Users/Stefan/Desktop/export1.por", use.value.labels =
FALSE)

HL7design <-svydesign(id=~ID2,strata=~STRATA, weights=~VIGT2, data=HL07 )

summary(HL7design)



> summary(HL7design)
Stratified Independent Sampling design (with replacement)
svydesign(id = ~ID2, strata = ~STRATA, weights = ~VIGT2, data = HL07)
Probabilities:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
 0.3779  0.6933  1.2880  1.3270  1.6970  3.0980
Stratum Sizes:
             1   2   3   4   5   6  11  12  13  14  15  16
obs        414 403 447 479 501 464 364 453 514 540 534 521
design.PSU 414 403 447 479 501 464 364 453 514 540 534 521
actual.PSU 414 403 447 479 501 464 364 453 514 540 534 521
Data variables:
NULL
>





 xtabs(~HL07$S73 + HL07$S36 )
        HL07$S36
HL07$S73   1   2   3   4   5   6   7   8   9
       1 199 248 517 707 736 156  57  10   2
       2 458 294 636 992 543  55  18   3   3


> QHISQ2 <- svychisq(~HL07$S73 + HL07$S36 , design = HL7design , statistic
= "Chisq")
Error in design$variables[, as.character(rows)] :
  incorrect number of dimensions



> QHISQ2 <- svychisq(~S73 + S36 , design = HL7design , statistic  = "Chisq")
Error in design$variables[, as.character(rows)] :
  incorrect number of dimensions

	[[alternative HTML version deleted]]

