Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Conformability error in svytab

From   Lee Sieswerda <>
To   "''" <>
Subject   st: RE: Conformability error in svytab
Date   Fri, 21 Jun 2002 16:08:38 -0400

Interesting.... I also get a conformability error, but it depends on whether
there is missing data in either of the two variables being used. The results
are like this:
missing + missing = conformability error
missing + no missing = conformability error
no missing + no missing = no conformability error

A conformability error occurs when a program tries to combine two matrices
that are of the same dimensions. A -trace- indicates that the conformability
error occurs after this line:

mat `J' = `J'*`Obs''

Like you, I can generate this conformability error in some of my data with
the following command:
svytab q1 q2, subpop(subgrad9) missing obs
1. one or both of q1 and q2 have some missing data, AND
2. the binary subpopulation variable (subgrad9 in this case) has a different
set of missing values from q1 and q2

I can get around the conformability error by making the missing value
structure of the subpop variable the same as the variables I want to
tabulate, like so:

gen subgradtemp = subgrad9
replace subgradtemp = . if q4==. | q5==.

Now, running the command with the new subpop variable eliminates the
conformability error, like so:
svytab q5 q4, subpop(subgradtemp) missing obs

I'm not sure if StataCorp could do anything to fix this. The code for svytab
is pretty darn complicated. However, it might be worth mentioning a
workaround like this one in the documentation of svytab.

Best regards,


Lee Sieswerda, Epidemiologist
Thunder Bay District Health Unit
999 Balmoral Street
Thunder Bay, Ontario
Canada  P7B 6E7
Tel: +1 (807) 625-5957
Fax: +1 (807) 623-2369

> -----Original Message-----
> From:	Arnold Levinson []
> Sent:	Friday, June 21, 2002 12:57 PM
> To:	Statalist
> Subject:	st: Conformability error in svytab
> Folks,
> When using -- svytab var1 var2, subpop(varname) missing obs -- I get
> conformability error r(503). If I omit any one of the three options, I get
> results. Any ideas?
> Arnold H. Levinson, PhD
> Associate Scientist
> Center for Research Methodology and Biometrics
> AMC Cancer Research Center
> Assistant Professor
> Department of Preventive Medicine and Biometrics
> University of Colorado School of Medicine
> 303.777.8801
> fax 303.239.3394
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index