I keep getting a "varlist not allowed" error when I write my forvalues loop, but I copied the syntax from the help file. I can't figure out what I am doing wrong... Would appreciate help!
forvalues i = 1/20 {
quietly sum if visit_id == `i' & visit_id != .
local N == r(N)
display `i' _col(20) `N'
}
Related Posts with forvalues error
Using "if" and "and" commands while generating variablesI have a numeric variable, say x. A lot of values are 0. The rest are all positive. I want to create…
Merging one file with every other file in folderHello, I am trying to merge one file in a folder with every other file in it by looping through eve…
Testing text on local macro dereferenceBecause the Stata User's Guide PDF is printed in a typeface that does not display punctuation identi…
Conditional code blockDoes Stata have a way to do conditional code blocks, i.e. Code: if condition { do this do this do …
First occurrenceHi all, I have a dataset with the launch_date (data_lancio) for each molecule, which is repeated ov…
Subscribe to:
Post Comments (Atom)
0 Response to forvalues error
Post a Comment