Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: -movestay- issue with variable abbreviation

From   "Nick Cox" <>
To   <>
Subject   st: RE: -movestay- issue with variable abbreviation
Date   Mon, 20 Sep 2004 10:23:42 +0100

The authors of -movestay- do not appear 
to be members of Statalist. 

I think Renzo is right. His example is 
fixed in the following way. Copy the program 
to a new file. After the block of code 

tokenize "`select'", parse("=");         // define vars for regression equation
	   if ("`2'"!="=") {;
	         tokenize "`select'";
                 local y_prob `1';
	         macro shift;
	         local x_prob `*';
           else {;
	         local y_prob `1';
                 local x_prob `3';

a new line is needed to unpack wildcards: 

	unab x_prob : `x_prob' ; 

My hunch is that this should not prove problematic
in other ways. 


Renzo Comolli
> I want to thank the authors of -movestay-. It is an important 
> contribution,
> and it will help me a lot.
> I think there might be an issue with varlist abbreviations though. 
> Sometimes, abbreviating a varlist with an * causes the error message
> "initial values not feasible".
> It does not happen with the dataset the authors use for their 
> example, so I
> posted my own (admittedly contrived) dataset.
> E.g.
> . use
> . movestay income age, select(group race_2 race_3) // this 
> works as intended
> . movestay income age, select(group race_*)
> The first instruction works as expected; 
> the second one does not (albeit in this dataset race_* 
> corresponds to race_2
> race_3)

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index