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
Superscript and subscriptDear Stata users, I have a variable with both superscript and subscript. When I wrote both superscr…
'No observations' errorDear all, I'm trying to conduct a unit root test to my variables using the following code: Code: …
Complex survey settingsHi, I am trying to set-up a complex survey data set in Stata and Mplus so that they have the same s…
Reshaping Datastream DataHello community. first of all I would like to thank you for the inclusion in this really instructive…
Comparison of predicted values after OLS regressionDear all, I am interested in predicted values after an OLS regression. Moreover, I am curious how t…
Subscribe to:
Post Comments (Atom)
0 Response to Directly modifying part of a date variable
Post a Comment