I wanted to change the contents in a variable. The variable, termed "outcome" contains integer numbers ranging from 1-9. I want to replace all the number 1's with the name "Outcome1". What code would I use to do this?
Related Posts with Changing the contents in a variable
How to compare list of dates to a reference date within each observationI am using Stata/SE 15.1 with Windows OS on a dataset with 6,650 observations and 2,341 variables. I…
Finite mixture models (FFMDear Stata users, I am in need of help, Does anyone know how to calculate the density properties (m…
Multiple if conditions within loopDear Stata users, I have an unbalanced panel dataset where I tag all lags for each firm/year pair (…
count total observations per firm per yearHello, I am a new Statalist. I have a firm ID variable(Ticker), a string variable(NED consist of "y…
Exponential moving average (tssmooth exponential) over last X observationsHi! I do not fully understand the "tssmooth exponential" command. How exactly is the value calculate…
Subscribe to:
Post Comments (Atom)
0 Response to Changing the contents in a variable
Post a Comment