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
Inconsistent Behavior Between Mata Functions and Identical Class Methods Toward Object TypesThis is occasioned by a thread begun by Alfonso Sánchez-Peñalver here. It’s been a while since I’ve…
Questions about the spmap commandHello Stata Community, I am currently using STATA/SE 14 to analyze social expenditure at the region…
Adjusting variables with Nelson-Aalen cumulative hazard functionDear all! I am struggling with the survivor function of the Nelson-Aalen cumulative hazard function…
how to get foreach of varlist v1-v10 take every second variable from the specified set (v1 v3 v5...)?Hi dear Statalisters, I was wondering if there is any way to get Stata to pick every second variable…
Switching data from long to wide view with dates and repeated observationsHi, I have the following data where my outcome of interest is the "foodcategory" variable. I am try…
Subscribe to:
Post Comments (Atom)
0 Response to foreach
Post a Comment