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
Assigning random number while using pre-defined observation specific probabilities (Result of an LCA) - using rdiscreteHello Statalist, As a result of an LCA I have three variables containing the probability of each ob…
Cmxtmixlogit discrete choice experiment with choice card blocksDear all, I am encountering a convergence problem with the 'cmxtmixlogit' command, using STATA 16.1…
Sum variables taking into account missing dataHello, I have the following dataset: Code: * Example generated by -dataex-. To install: ssc insta…
Elasticity analysisHi all, I am in urgent need to find the solution of a problem. It would be great if you guys could h…
Error: <istmt>: 3499 ASREGFMB() not foundGood morning, I try to run the asreg command and I receive this error. I checked that the installati…
Subscribe to:
Post Comments (Atom)
0 Response to panel data and time variable format
Post a Comment