| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: error: variable present in model more than once when using
From |
[email protected] (Jeff Pitblado, StataCorp LP) |
To |
[email protected] |
Subject |
Re: st: error: variable present in model more than once when using |
Date |
Tue, 23 Jan 2007 13:05:19 -0600 |
Brent Fulton <[email protected]> wrote in that -svy jackknife- was
reporting the following error message:
... present in model more than once
r(322);
where '...' was the name of a predictor variable in the model.
This particular error message is only possible when there are multiple long-
and similarly-named predictors in the model being fit by -svy jackknife-.
The problem here is that -svy jackknife- (and other prefix commands such as
-svy brr-, -jackknife-, and -bootstrap-) try to use the original equation and
variable names when the elements of e(b) are being replicated. For example,
suppose we have
. svy jackknife: nbreg y x1 x2 x3
-svy jackknife- will compose variable names for the -keep- and -saving()-
options. In this case the name stripes and corresponding potential variable
names are:
name stripe -> varname
-------------------------------------------
y:x1 -> y_b_x1
y:x2 -> y_b_x2
y:x3 -> y_b_x3
y:_cons -> y_b_cons
lnalpha:_cons -> lnalpha_b_cons
When the name of a potential variable exceeds 32 characters (see c(namelen) in
-help creturn-) then an abbreviated variable name is attempted by taking the
first 12 characters of the equation name and similarly for the variable name.
Brent has 2 predictor variables with around 30 characters in their name, but
they only differ in that last 9 characters and the response variable name is
10 characters long.
For the time being, Brent can solve this name conflict by shortening some of
his variable names.
We will take a serious look at improving the name generation logic used by
-svy jackknife- for the case of long- and similarly-named predictors.
--Jeff
[email protected]
*
* 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/