I am trying to encode multiple variables and replace remaining strings with a numeric character - however i am getting an error r(100)
. foreach var of varlist company_23 debt_23 pairincome {
2. encode `var', gen(_`var')
3. replace `var'=0 if `var>2500
}
varlist required
r(100);
How can i solve this?
Related Posts with encode foreach error
to account for clustering or not to account for clustering?I’m doing an analysis of applicants for grants over several years. In a given year, duplicate people…
How to use the "replace" option with xls2dta commandHi All, I used the following command to import several Excel sheets into a dta file. It worked well…
2SLS when the first stage is probit model for panel data!Dear statalists, I am very new to STATA and trying to use 2SLS when the IV is a binary variable. I h…
summing and subtracting when there is missingHello, I try to generate a variable that is includes missing, how can I ignore these missing values …
How to read non-collinear factor variables into mataI want to read factor variables into mata and omit the base level from the resulting matrix. The cod…
Subscribe to:
Post Comments (Atom)
0 Response to encode foreach error
Post a Comment