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
Estimating the effects of a shockHi all. I am working on a research project to estimate the respective effects of divorce, jobloss a…
Generate adjacency matrix in Mata and using it as input in StataDear all, I am using Stata 16 on Mac 10.14. I am currently working with two geocoded datasets. Data…
one less class in latent class analysis with -gsem-Is there anybody who can explain why this 3-classes LCA model with -gsem- command gives me only two …
Time Fixed EffectsDear Stata users, For my analysis, I need to use time fixed effects on my panel data (Country-Year)…
Please help: comparing three average treatment effects (ATE) coefficients to determine if they differ significantlyDear colleagues, I am running an average treatment effects analysis (teffects) for the binary outco…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values
Post a Comment