Hi, I am trying to replace the value of one variable when the condition holds (the condition is that the survey_data (type double %td ) has to be equal to 04jul2020. When I try this: replace enumerator = 114 if survey_date == 04jul2020; I get the error 04jul2020 invalid name. when i try this: replace enumerator = 114 if survey_date == "04jul2020" , I get the error:
type mismatch.
Could you please help me?
Related Posts with Replace if value is a date
Prob>chi2 equals dotHello everyone, I'm currently running a panel data consists of 124 observations. I want to do LM te…
Predicted probabilities with -melogit-Dear all, I am running a multilevel model (random slopes) with 2 levels (individuals nested in coun…
Difference-in-difference and CEM with panel data Dear everybody I am investigating how employees are affected when they are outsourced from public …
Mathematics in stata /stock return / change in log stock pricesHello everyone, I have 400 firms and I have closing prices for 5 months ( Nov 2018 ,Dec 2018, and Ja…
Updated markstat for Stata 17Thanks to Kit Baum an update to -markstat- is now available at SSC. To update type Code: ssc insta…
Subscribe to:
Post Comments (Atom)
0 Response to Replace if value is a date
Post a Comment