Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[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 <[email protected]>
To   [email protected]
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
<[email protected]> 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index