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
Panel data analysisI am estimating a panel data model with a balance panel. this model is linear (singal independent va…
How to double quote the double quoteDear Stata users, I have a string variable that some values of it are leading by a double quote (")…
Identifying houshold with all mebber of same characteristics (sex)Hi, I am trying to drop all houshold that contains all member of same sex but I am unable to perform…
help for GARCH (1,1) modeldear all, i am facing a problem in GARCH (1,1) model in time-series analysis. There are three main v…
bivariate multinomial probit with sample selection using cmpI am trying to build a bivariate multinomial probit model with each of the multinomial decisions mad…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing a data variable if data falls within a date range
Post a Comment