Dear Statalist,
I have a variable State with storage type str3. I want to creat a dummy variable, 1 when State equals "CT", 0 for else. So I generate a new dummy as below:
gen New_England = 0
replace New_England = 1 if State == "CT"
But 0 real changes made.
I am confused which step is wrong. Forgive me that I may ask a silly easy question.. And thank you for your help!
Best regard
Lijuan
Related Posts with replace if with no real changes made
Graph bar -Hi everyone, I'm making a graph for a variable with three categories that resembles the following: …
Graph bar - Centering one graph when using -by()-Hi everyone, I'm making a graph for a variable with three categories that resembles the following: …
bsample result not robust after innocuous data manipulation?Hi Stata users, Currently I found the bsample is not returning robust results after some seemingly …
-gllamm- for dynamic multinomial logit model with random effectsDear all, I am working on household survey panel data (3 waves) to analyse the dynamic between 4 sta…
Metan forest plot x-axis legend insertion - how?Hi all, can anyone help me with this? Trying to label the two sides of the x-axis with "Favours con…
Subscribe to:
Post Comments (Atom)
0 Response to replace if with no real changes made
Post a Comment