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
For loop for running multiple regressions in StataI am new to STATA. I know how to run logistic regressions individually and to predict values and re…
Multiply two data setsHi everyone, I have two data set or matrices: matrix a (2x164) and matrix b (164x82). In these two …
Unequal interval systematic samplingI can easily do systematic sampling from the equal interval sample like 1,2,3,4,5,6,7,8,9,........ B…
How to calculate percentage of certain categories using bysort command?I have a dataset at the individual level which includes a variable on education. The variable takes …
Penalized spline models with -mixed-Greetings, all. I recently ran across a StataCorp presentation by Roberto Gutierrez that discussed …
Subscribe to:
Post Comments (Atom)
0 Response to Business calender generates year 1967 dates
Post a Comment