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 <[email protected]>
To   "'[email protected]'" <[email protected]>
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
IF AND ONLY IF:
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

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
[email protected]
www.tbdhu.com



> -----Original Message-----
> From:	Arnold Levinson [SMTP:[email protected]]
> 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
> [email protected]
> fax 303.239.3394
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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