i am using Stata 14.
levelsof cropcode, local(code)
foreach x in local `code' { tabstat acd ack if cropcode==`x' & & state_s==1, stat(su) }
After running above command, i get error local not found
Related Posts with foreach
change from row to collumn without reshapehi I have a long data. i would like that each categorie of one variable "class" became a collumn, wi…
Why Stata doesn't recognize empty valuesHi, I have recently created a new variable mothergrad1 and there are empty values when I used the f…
Counting Instance of a variable and returning averageI am a student and new to Stata. Any help is appreciated. I have a data set with age and weight. I …
Dropping certain observations of a variable in a specified rangeI want to drop only certain observations of l_growth for each naic that are between 1997Q1 and 2009Q…
Sum Variable in columsHello i have id Year temp "seq" 1 2001 . 0 1 2002 1 1 1 2003 1 2 1 2004 . 0 2 2001…
Subscribe to:
Post Comments (Atom)
0 Response to foreach
Post a Comment