Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
dofor i = australia canada france germany japan netherlands uk us
set lx = log(i{0})
When I execute the above lx still have zero observations. I checked another source and it suggested the following, but I do not know what is meant by [series]
log [series]i / lx
I am a beginner and I respectfully request anyone's help. Thank you!
You don't need or want the type modifier (the [series] tag) on the LOG instruction. You would just do:
log i / lx
For an instruction like this, RATS knows that the first parameter has to be a series, so if you supply an integer, it automatically treats it as a series number.
RATS can't make that assumption when an integer appears on the right side of a SET instruction (it has no way of knowing that you mean for an integer to refer to a series number). That's why you would need to add lag notation or a type modifier:
set lx = log(i{0})
or
set lx = log([series] i)
Any of the three above commands is correct. If you are still getting missing values in all entries for LX using any of these, then the source of the problem lies elsewhere. The first step would be to check the original series. For example, do:
print / australia canada france germany japan netherlands uk us
Do the data look correct? If not, work back from there to see where you've made a mistake.