Dear Stata users,
I have a date variable formatted using %tmCCYYMon. However, I have identified a subset of observations for which years are wrong: they should be equal to 2018 instead of 2019. I can easily identify which observation is wrong by using a "flag" dummy.
Is there a way to directly modify the variable using -- replace date = .... if flag==1 --
This may sound like a simple question, but I cannot find an answer anywhere.
Thank you in advance,
Jack
Related Posts with Directly modifying part of a date variable
time seriesI have time series data on five variable which model should I use …
VAR switching modelsHi I'm trying to model a VAR model using switching regimes appraoch. I know that STATA14 performs SP…
Gini coefficientHello How do I calculate the Gini coefficient with the equivalent scale method using these data for …
Need to change order of boxes in box plot commandDear statalist, I have a command to graph a box plot for multiple variables and year as follow Cod…
Exporting iterative Metaan results to excelI developed an iterative loop to calculate Metaan for a total of 39 studies. I have been trying to e…
Subscribe to:
Post Comments (Atom)
0 Response to Directly modifying part of a date variable
Post a Comment