I want to use _N in place of the total count of observations in a loop like this:
forvalues i = 1(1)_N {
}
instead of directly putting the number. But I'm getting an "Invalid syntax" error. Can anyone help me with this or suggest any alternative?
Related Posts with Error while using _N in forvalues loop
Download STATA 15 SE 64 Bit Full VersionDownload STATA 15 SE 64 Bit Full Version …
equality-of-distributions testHow can I perform Kolmogorov-Smirnov-Lilliefors test of normality test? I know that "ksmirnov'" comm…
Error message "invalid 'Drive'" when using spwmatrixHi all, I am trying to import a Geoda-generated .gal file into Stata and export it as a .txt file. …
help with string variable comprising multiple linesHi Statalist, After importing from Excel (-import excel-; .xlsx), I have some string variable value…
Help summing data for men and womenHi, I have data on the number of people of each age in each local authority. The problem at the mome…
Subscribe to:
Post Comments (Atom)
0 Response to Error while using _N in forvalues loop
Post a Comment