Hi all,
I have a dataset containing values ranging from 1 to 3. I'd like to replace all the 1 to 3, and all the 3 to 1. But if I first run the code for replacing 1 to 3, and then run the second code to replace 3 to 1, then all the replaced 3 including the original 3 gets replaced with 1. Is there a way to turn only the original 1 and 3 to 3 and 1 respectively? ( I cannot change it to any other value)
Thanks in advance.
Related Posts with Replacing values
Cohort variableHello! I am using data about households and I am interested in analyzing homeownership and mortgage …
Testing for Endogeneity of Dummy Variables.Hi all, I am conducting some research into impact of the World Cup on the growth rate of host count…
Creating cohorts- pseudo panel dataHi, I'm using 3 rounds of cross sectional NSSO data and would like to generate a pseudo panel datase…
String variable quarterly timeHello everyone, First of all, I have learned a lot from this forum. However, I could not find the a…
Adding Back Perfect Predictions to Probit Average Marginal EffectHello! I am running a probit regression in Stata. The dependent variable is binary with 1 for promo…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values
Post a Comment