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

st: `x' notation

From   "Terra Curtis" <>
To   <>
Subject   st: `x' notation
Date   Mon, 24 Oct 2005 16:45:12 -0400

Dear Statalist,

I have a question regarding the `x' notation.  I've looked through the
Statalist archive and found some hints but I can't seem to make it work how
I want.

I have a forvalues loop I'm trying to run:

forvalues x=1989(1)2005 {
	forvalues y=1(1)12 {
		if `x'==2005 & `y'>8 continue

And when I run that I get the following error:
det ambiguous abbreviation

end of do-file

After some experimenting I know that the problem lies in
the(det`launchdatemo'`launchdateyr') part.  I need the denominator to refer
to, for example, the variable det11989 if launchdate (one of my variables)
for that observation is equal 1/1/1989.  I have created two variables,
launchdatemo and launchdateyr which are the launch date month and year,
respectively. That's what I'm trying to refer to in the denominator above.
Is there some other way or some other notation I can use to refer to these


*   For searches and help try:

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