Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: error: variable present in model more than once when using -svy: reg- with replicate weights


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: error: variable present in model more than once when using -svy: reg- with replicate weights
Date   Sat, 20 Jan 2007 08:17:35 +0000 (GMT)

One possible reason for this error would be if, your data, x1_x4 is
somewhere between wgt1 and wgt90. The statement wgt1-wgt90 does not
refer to the numbers in their name but to the order in which they
appear in your dataset. So if the order of variables in your dataset
is:
wgt1 x1_x4 wgt2 wgt3 ... wgt90 then x1_x4 will appear in both the
regression part and the jkrweight part. You can move x1_x4 to the left
with the -order- command.

Hope this helps,
Maarten


--- Brent Fulton <[email protected]> wrote:
> I am using Stata 9 -svy: reg- with JK2 replicate weights and get the
> following error:
> 
> svyset [pw=wgt0], jkrweight(wgt1-wgt90, multiplier(1)) vce(jackknife)
> mse
> svy: reg dep1 x1 x2 x3 x4 x1_x4
> *where x1_x4 is x1 interacted with x4
> 
> error statement: x1_x4 present in model more than once 
> 
> 
> I think the problem is with the replicate weights because the
> following
> commands estimate the model (but obviously have incorrect SEs (and
> biased
> parameter estimates in the first case)).
> reg dep1 x1 x2 x3 x4 x1_x4
> 
> svyset [pw=wgt0]
> svy: reg dep1 x1 x2 x3 x4 x1_x4


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


		
___________________________________________________________ 
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
*
*   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