Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: RE: xtivreg2 invalid variable name r(198); while using first or fe option


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: RE: xtivreg2 invalid variable name r(198); while using first or fe option
Date   Wed, 5 Oct 2011 10:37:10 -0500

For the "too few variables specified r(102)" error -set trace on- to
see what is causing the problem

For the "D.TaeglichesWachst_ invalid name r(198)" error, rename the
dependent variable so that it is less than 19 characters in length so
the variable name plus "D." plus the reduced form prefix "_ivreg2_" is
not greater than 27.  Or use the -saverfprefix()- option with a
shorter prefix.


For example:

. webuse grunfeld,clear

. gen TaeglichesWachst_relat  = runiform()

. xtivreg2   TaeglichesWachst_r  invest  (kst = mval), fd first
D.TaeglichesWachst_ invalid name
r(198);

. xtivreg2   TaeglichesWachst_rel  invest  (kst = mval), fd first
saverfprefix(iv)

FIRST DIFFERENCES ESTIMATION
<snip>

. rename TaeglichesWachst_rel TaeglichesWachst_

. xtivreg2   TaeglichesWachst_  invest  (kst = mval), fd first

FIRST DIFFERENCES ESTIMATION
<snip>


Scott

On Wed, Oct 5, 2011 at 8:35 AM, Daniel Schalling
<daniel.schalling@uni-weimar.de> wrote:
> I checked all variable names with di length() and shortened all to a max of
> 27 characters. I assume that stata is adding some characters to the variable
> names during the estimation and this wasn't possible for the ones which had
> already a length of 32. But xtivreg2 still doesn't work .
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index