[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: forvalues and scalar: easy question
since I have already disturbed a colleague who could not help me out I am going to confront you with my small problem:
I want Stata to run a loop from 1 to the maximum of observations in my dataset.
gen obs2 = _n
scalar m = r(max)
Which did not work. There is probably a very easy way to do that but I just do not know it.
Any suggestions are greatly appreciated.
Dipl.Vw. Justina A.V. Fischer,
SIAW - University of St. Gallen
CH-9000 St. Gallen
Fax: ++41-71-224 2298