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
Adding linear time trends (dropped)Dear Statalist Users, I have the following data. This dataset is at city level. Plate=unique ident…
Fixed effect- three identifier variables and result interpretationI have panel dataset where each observation is identified by three variables ( server#, Motherboard_…
No Output, Infinite Cycling Wheel (Multiple Imputation Fixed Effects Logistic Regression)Need help troubleshooting a Stata issue. I've been running into dead ends the last few days. The …
Logistic regressionHi, Im trying to regress logit model with categorical data. The dependent variable has 4 categories.…
Variance Covariance Matrix of Sureg in StataHi everyone, I have a question about how to display the variance-covariance matrix for the residual…
Subscribe to:
Post Comments (Atom)
0 Response to replace if with no real changes made
Post a Comment