Hi, I am new to Stata. In my case, I have a variable equal to 1, 2,3,4,5 and my task is to make the replace the variable equal to 1 if it original equal to 5, 2 to 4, 3 remain the same, 4 equal to 2, 5 equal to 1. How can I do it in Stata?
Related Posts with replace the value of variable
Stuck while calculating moving medianHello, Currently, I am writing my thesis, in which I have to calculate the moving median of the ROE…
No data is running with adding "capture" to my code, but there is no new error message (this code works for my elder collegue)Dear, Sorry in advance if I'm maybe not using the right STATA-language! I'm using STATA 16.1 on Wi…
panel data: aggregate imputed variables to a new variable using miI am working with panel data for two waves at the moment. The dependent variable (outcome) is a bina…
Multiple Instrumental VariableHey everyone, I have the following equation: y=aX1+bX2+cX3+dX4+e I want to instrument Z1 for X1 a…
Comparing samplesDear Stata users, I will please like some explanation. I am working on the topic "the effect of chi…
Subscribe to:
Post Comments (Atom)
0 Response to replace the value of variable
Post a Comment