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
Can npregress be used to predict mean value of y at given xIf I split the data into training and test group, can I use npregress to predict the mean value in t…
how to include an if qualifier in an egen command mean() functionI'm working with a time-series panel data set and am attempting to calculate a cross sectional mean …
Regression CodeDear Statalists, I am trying to implement difference-to-difference estimation as a regression contr…
number of cuts- ologithello to all I want to categorized a data sample based on the income into categories such as " low c…
Pooled OLS, Random Effects and Fixed Effects all giving exact same results!Hi there, I am using a panel data set to investigate the link between inequality and growth. But I…
Subscribe to:
Post Comments (Atom)
0 Response to Business calender generates year 1967 dates
Post a Comment