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
Quadratic Regressioni am doing logit regression with workhours and workhours-square as independent variable and depressi…
DSGE model on STATA or DynareI seek to stimulate an analytical model that links financial inclusion, financial frictions and econ…
Regression using a part of the independent variableDear Statlisters, I am currently writing my thesis and doing research on the effect of changes in t…
Problem with Panel ARDL lag selectioni am a phd student working on Oil Price Shocks and asymmetries of industrial production for which i …
Generating integer variable from nonnumeric dataHello All, My panel data set has 5 years of data. The data set includes no. of directors (with titl…
Subscribe to:
Post Comments (Atom)
0 Response to panel data and time variable format
Post a Comment