Hello,
I have a dataset and i need to define quarterly time variable and declare data to be a panel data. "datadate" variable - contains the calendar date of the fiscal year end of a firm. So what i did is generated a quarter variable and then declare data to be a panel data. I am not sure if my code is correct.
g quarter = qofd(datadate)
format quarter %tq
xtset permno quarter
But is it possible to use a shorter code? Will this code have the same result?
g quarter = qofd(datadate)
xtset permno quarter, format(%tq)
THank you in advance
Related Posts with panel data and time variable format
ESTIMATE Workshop at Michigan State in early JuneHi All: I'm not sure about the proper protocol when advertising workshops on Statalist. I suspect s…
removing 95%CI and renaming axis by intervalsHere is my code for prevalence vs month: logit mrsp i.month margins month, plot(ytitle(Prevalence) …
Need help with the postfile commandHello, I'm trying to use the postfile command but everytime i try to execute it it gives me a error…
using the i.year for time-fixed effects in a Differences-in-Differences ApproachHello everyone, I am not sure if a combination of a time-fixed-efffects model and a Differences-in-…
Confidence intervals for the difference of two regression coefficient meansHi all, I am trying to calculate confidence intervals for the difference of two regression coeffici…
Subscribe to:
Post Comments (Atom)
0 Response to panel data and time variable format
Post a Comment