Hi Statlisters,
I have succesfully loaded my business calender by using the below code, however when i generate my "bdate" variable it generates dates from 1967, I have searched through the different threads in here, but I dont seem to find any solution to my problem. My original date variable is named "date" - I am new to STATA so i generated the business calender based on post from statalist.org.
// Business calender code
purpose "Converting daily financial data into business calendar dates"
dateformat dmy
range 01jan2010 24feb2022
centerdate 01jan2010
omit dayofweek (Sa Su)
omit date 17feb2020
// Load business calender
bcal load daily
// Generate new date variable based on business calender
gen bdate = bofd("daily",date)
format %td bdate
//Time series
tsset ID bdate
When I run this code it generates the following output
panel variable: ID (strongly balanced)
time variable: bdate, 16mar1967 to 19apr1967
delta: 1 day
Can someone help me out on this issue?
Best regards,
Jeppe S
Related Posts with Business calender generates year 1967 dates
Student asking advice on how to learn mixed effects models and generalized estimating equations to account for 2 eyes in 1 patientGood day everyone, I'm a beginning ophthalmology researcher/student, and I wanted to reach out peop…
Zero-inflated Poisson: ratio (95% CI) for a 0,1 variableZero-inflated Poisson: ratio (95% CI) for a 0,1 variable I would greatly appreciate advice about th…
Treat numeric variables as factor variablesI have a dataset with 3500 companies. Each company has a unique company ID (variable name is id), wh…
Plotting interactions so their cumulative effects can be illustratedHi, I am trying to plot three categorical by continuous interactions on top of one another so that …
Running Difference in Difference with Fixed Effects, what assumptions to check next?I'm doing a DiD for a pension reform law that went into effect in 2016. I am using micro data from n…
Subscribe to:
Post Comments (Atom)
0 Response to Business calender generates year 1967 dates
Post a Comment