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
Prediction interval (not confidence interval) calculations for glm w/ robust VCE model?In reference to the two threads below, did anybody ever figure out how to get prediction intervals/i…
5*5 bivariate dependent sorting for portfolio creation Code: * Example generated by -dataex-. To install: ssc install dataex clear input str15 companies b…
Accessing Files Created within SubprogramI am writing a Stata .ado program that performs the same subroutine many times. As such, I would lik…
Overlay graphics in Stata / Export graphic with transparent background?I have 2 graphics (attached, .gph and .png versions of each) that I created with a user-written comm…
Fixed Effects: how to report in a tableHi all, I would like to ask a question, please, about how to report a fixed effects regression in a…
Subscribe to:
Post Comments (Atom)
0 Response to replace if with no real changes made
Post a Comment