# Re: st: Correlogram

 From WilDsCOP To statalist@hsphsun2.harvard.edu Subject Re: st: Correlogram Date Tue, 20 Apr 2004 10:51:44 +0600

Dear All,

First of all, thanks to Naheed Mirza for the kind reply.

However, I had already used '. tsset time' in my commands (see my applied commands below this e-mail), but didnot work out (may be due to gappy date - is there any way to handle such quarterly date?) and unable to find proper help for command -tdates- (i'm a newbie - i tried help for tdates in stata 7 help menu, but using '. format mydate %tq' don't seem to work)!

If it is possible, can anyone provide me with the exact stata commands to draw a Correlogram using the data http://www.angelfire.com/ab5/get5/gujarati.txt ?

Thanks in advance for your time and effort.

Any response / help / comment / suggestion / idea / web-link / replies will be greatly appreciated.

_______________________

Mohammad Ehsanul Karim <wildscop@yahoo.com>
Institute of Statistical Research and Training
University of Dhaka, Dhaka- 1000, Bangladesh
_______________________

>>> Your data are quarterly. Best to -tsset- them as such. For
example, see help on -tsset- and -tdates-.

--------------------------------------
. infix str10 YEAR 1-10 GDP 11-20 PDI 21-30 PCE 31-40 PROFITS 41-50 DIVIDENDS 51-59 using c:\gujarati.txt
. generate times = date(YEAR,"dmy")
. format times %dD.N.CY
. label data "Macroeconomic Data, United States, 1970.1 to 1991.4"
. note: Data taken from Gujarati (2003) 'Basic Econometrics' 4 th ed. Page 794
. save c:\gujarati.dta
/* This is saved in http://www.angelfire.com/ab5/get5/gujarati.dta */
. clear
. use c:\gujarati.dta
. gen day = day(times)
. gen month = month( times)
. gen year = year( times)
. gen mydate = mdy(month,day,year)
. format mydate %tq
. tsset mydate
time variable: mydate, 2873q2 to 4836q1, but with gaps

. corrgram GDP, lags(25)
(note: time series has 86 gaps)

-1 0 1 -1 0
> 1
LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor
> ]
------------------------------------------------------------------------------
> -
1 0.0000 . 0 1.0000 |
2 0.0000 . 0 1.0000 |
3 0.0000 . 0 1.0000 |
4 0.0000 . 0 1.0000 |
5 0.0000 . 0 1.0000 |
6 0.0000 . 0 1.0000 |
7 0.0000 . 0 1.0000 |
8 0.0000 . 0 1.0000 |
9 0.0000 . 0 1.0000 |
10 0.0000 . 0 1.0000 |
11 0.0000 . 0 1.0000 |
12 0.0000 . 0 1.0000 |
13 0.0000 . 0 1.0000 |
14 0.0000 . 0 1.0000 |
15 0.0000 . 0 1.0000 |
16 0.0000 . 0 1.0000 |
17 0.0000 . 0 1.0000 |
18 0.0000 . 0 1.0000 |
19 0.0000 . 0 1.0000 |
20 0.0000 . 0 1.0000 |
21 0.0000 . 0 1.0000 |
22 0.0000 . 0 1.0000 |
23 0.0000 . 0 1.0000 |
24 0.0000 . 0 1.0000 |
25 0.0000 . 0 1.0000 |
-----------------------------------------

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/