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
Creating Date from Elapsed TimeI want to know when romantic relationships began. I have three different variables that indicate how…
How to make subgraphs on the same rowgraph bar (percent) countme, over(dif) by(weekday) I am plotting very simple subgroup bar chart by …
Create a new variable that count for the number of observations of a variable for the previous yearHello everyone, I have trouble creating a new variable with my data. In my data every event_date co…
Split issueI have a dataset with data by Congressional district: . dataex congdist in 1/5 Code: * Example …
How to report t-stat of sum of coefficient in journal/thesisDear all, I would like to report the sum of coefficient of interaction term and normal variables, in…
Subscribe to:
Post Comments (Atom)
0 Response to Replace if value is a date
Post a Comment