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   "Brent Fulton" <[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 16:40:24 -0800

Thanks, Maarten, for your suggestion, but unfortunately that wasn't the
issue. 

Note that the model below is a simplified version of the real model, which
includes a dependent variable that could be considered continuous and 0/1
independent variables. The variables {x1, x2, x3} represent a 4-level
categorical variable, and the variables {x4, x5} represent a 3-level
categorical variable.

svy: reg dep1 x1 x2 x3   x4 x5   x1_x4 x2_x4 x3_x4    x1_x5 x2_x5 x3_x5

Since the combined sets of variables represent 12 levels, I also tried
another model where I created 12 interacted 0/1 variables (and each had at
least 18 "1's") and ran:

svy: reg dep1 interaction2-interaction12

and it gave the same error: interaction10 present in model more than once

Any other thoughts would be appreciated...because this is a really strange
error considering what I am trying to do. Has anyone else ever had this
error? (This is different than the more well known "(dropped)" text next to
a variable in the output table due to perfect collinearity.)

Thanks,
Brent

 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Maarten buis
Sent: Saturday, January 20, 2007 12:18 AM
To: [email protected]
Subject: Re: st: error: variable present in model more than once when using
-svy: reg- with replicate weights

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/

*
*   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