Minor but annoying problem with locals. I have a long variable list that I would like to add to a file with the following code. I keep on getting errors for invalid syntax and too few variables specified. I have not been able to find a fix to the code. Any suggestions
local vars "site_visits_with_case_worker Indoor_Bathroom Porta_Potty washing_Station ADA_Compliant_Shower"
local num: word count `vars'
foreach i in 1/`num' {
local temp `: word `i' of `vars''
di `temp'
gen `temp' = .
}
Related Posts with Problem with locals
Two-Way CoefplotI am running 40 regressions. In each regression I regress an indicator for having price at least as …
Help with xtdcce2Dear community, I am trying to implement CS-ARDL model via xtdcce2. I am using 9 countries and 1990…
Robust SEs with weighted senspecI am weighting survey data with pweight and have successfully estimated sensitivity and specificity …
Fama MacBeth RegressionHello, I want to run Fama MacBeth Regression and see if changes in macro economy affects PE industry…
recoding dummy variablesHow do I recode my dummy variables please? I have 3 categories 0,1,2 and I mistakenly coded 1 for 2 …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with locals
Post a Comment