Hello, I am fairly new at using stata, thus since I want to control for time varying influences (my time series data set consista of daily data) I want to create binary variables for day of the week, day of the month and month of the year, however I am having trouble understanding how to do this. I tried by first creating a day of the week variable with stata, and then using the following code to create day of the week dummies: tab dow, gen (d) and I ended up with seven dummy variables and not six, is that correct? Are there other methods of doing it? I'd also like to know how to do it for day of the month, month of the year and for holidays. I am a beginner with stata, thus any help would be highly appreciated.
Related Posts with How to create dummy variables for day of the week, day of the month etc.
Stata package for LCA and SEM modelsDears, Can anyone please give me a solution for running the LCA and SEM models in stata. Is there a…
Examination variation/moderation intraclass correlationIn a multilevel analysis with mixed, I can estimate the icc after the main analysis. However, I may …
What code will match longitude and latitudesI hope there is someone that will be able to help me. I have been looking at previous FAQ on Statali…
Exporting weighted cross tabulation from stata to excelHello, I'm looking to export a weighted cross tabulation from stata to excel. The variables I am ta…
Too many variables specified error with keep and browse commandI have created a large local (called stubs) of variable stubs with wild cards e.g. "var1_* var2_* va…
Subscribe to:
Post Comments (Atom)
0 Response to How to create dummy variables for day of the week, day of the month etc.
Post a Comment