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
Can Positive IV Probit Coefficients imply Negative Marginal Effects?Dear list members, I am sorry to ask about this again, as my other post was presumably phrased to t…
Selecting lags for Pesarans unit root tests which controls for cross-sectional dependenceI am trying to run a panel unit root test using the PESCADF command in Stata. However I am confused …
How to create robust standard errors, clustered by firm IDHi guys, I am currently using a data panel set and want to do a simple pooled OLS regression. I hav…
How to swap components of variable name?Hi - I have about 1200 variables that are in the format monYY_[indicator] which means they look some…
Unable to replicate Stata 16 code local x = r(table)[1,1] in Stata 15Dear all, I have run into a problem trying to replicate some code from Stata 16 in Stata 15. Do you…
Subscribe to:
Post Comments (Atom)
0 Response to replace the value of variable
Post a Comment