First of all, i like to thank Nick Cox and specially Toyoto Iwata for their
replies.
However, i have some questions about this : The commands
. gen month = substr(date, 3, 2)
type mismatch
r(109);
. gen year = substr(date, 6, 4)
type mismatch
r(109);
issues some sort of error. Why? I use Stata version 7.0 Also i'm curious
about what does these commands are supposed to do ?
Anyway, thanks to Toyoto Iwata again (who actually wrote me the whole code)
for directing me to the command
. egen quarter = group(month)
This does the whole thing (what does this command actually do?). I solved
my problem (For future reference, i paste them below of this e-mail).
Thanks all of you for your time and effort.
_______________________
Mohammad Ehsanul Karim <[email protected]>
Institute of Statistical Research and Training
University of Dhaka, Dhaka- 1000, Bangladesh
_______________________
-----------------------------------
Drawing Correlogram Using Stata version 7.0
-----------------------------------
In Stata Command Window, we write the following commands:
. infile str9 date float (GDP PDI PCE PROFITS DIVIDENDS) using
http://www.angelfire.com/ab5/get5/gujarati.txt
. generate times = date(date,"dmy")
. format times %dD.N.CY
. gen day = day(times)
. gen month = month(times)
. gen year = year(times)
. egen quarter = group(month)
. gen time = yq(year, quarter)
. tsset time
. corrgram GDP, lags(25)
-----------------------------------
Then in Stata Results Window, we obtain the following outputs: