Hello. Sorry, if my question seems stupid to you, im fairly new to stata and cant seem to figure out the problem on my own.
I want to recode a list of variables at the same time by using the loop foreach. My problem is that the following syntax seems to be wrong:
foreach var of varlist v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 {
recode `var' (4=2)
}
I would appreciate it if someone would tell me what i'm doing wrong or what i'm missing in the syntax.
Thanks in advance
Related Posts with Foreach recode
Inverse of the normal cumulative distributionHello everyone, Given a value for probability, I would like to seek that value x such that F(x, mean…
Bayesian iRT using bayesmhGood day house, please i am very new in stata, I have fitted 1PL, 2PL and 3PL logistic regression to…
Bug in confidence interval calculationWhen I estimate a confidence interval for the mean over years/groups, the calculation of the inverse…
A question on randomizationI wonder if there is a command that can do the following: 1. I have a list of 7 numbers, say (2,5,7…
How to draw concentration curveHere is example of my data Any one run concentration curve with twoway option and give me full set o…
Subscribe to:
Post Comments (Atom)
0 Response to Foreach recode
Post a Comment