I have some data that was misclassified for a certain date range and would like to change using Stata. I am trying to change variable "type" to "3" for date range Dec 17, 2018 to Jan 10, 2019. Below is an example of how the data looks and the code I've tried. I also have a variable for date that is a string variable.
input type date
1, 03jan2018
2, 05mar2019
2, 25dec2018
2, 01jan2019
replace type = 3 if inrange(date, 17dec2018, 10jan2019)
Related Posts with Replacing a data variable if data falls within a date range
Interaction plot after poisson regressionHello everyone, after running the following regression: Code: xtpoisson patents cL.ln_xrdintensit…
joint significance of the dummy variablesHi, How do I test for the joint significance of the dummy variables using Stata commands? Denis …
Log transformation of the dependent variable in a first-differences modelHello all, I am estimating a first differences model of the following form ΔYit = ß0 + ß1ΔXit + ɛit…
Interaction plot after poisson regressionHello everyone, after running the following regression: Code: xtpoisson patents cL.ln_xrdintensit…
identify common ownership of shareholdersDear statalist, I have a set of data with the following variables: year, symbol (symbol of each fir…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing a data variable if data falls within a date range
Post a Comment