Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Correlogram


From   WilDsCOP <[email protected]>
To   [email protected]
Subject   Re: st: Correlogram
Date   Tue, 20 Apr 2004 23:36:07 +0600

Dear all,


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:

-1 0 1 -1 0
> 1
LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor
> ]
------------------------------------------------------------------------------
> -
1 0.9689 0.9986 85.462 0.0000 |------- |-------
2 0.9353 -0.3197 166.02 0.0000 |------- --|
3 0.9014 -0.0959 241.72 0.0000 |------- |
4 0.8658 0.0297 312.39 0.0000 |------ |
5 0.8298 -0.0398 378.1 0.0000 |------ |
6 0.7912 0.0246 438.57 0.0000 |------ |
7 0.7519 0.0074 493.85 0.0000 |------ |
8 0.7125 0.0613 544.11 0.0000 |----- |
9 0.6749 0.2970 589.77 0.0000 |----- |--
10 0.6381 -0.1468 631.12 0.0000 |----- -|
11 0.6014 -0.0969 668.33 0.0000 |---- |
12 0.5655 -0.0035 701.65 0.0000 |---- |
13 0.5322 0.3781 731.56 0.0000 |---- |---
14 0.4998 -0.0533 758.29 0.0000 |--- |
15 0.4677 0.1405 782.02 0.0000 |--- |-
16 0.4370 0.0278 803.03 0.0000 |--- |
17 0.4053 0.1068 821.35 0.0000 |--- |
18 0.3748 -0.0388 837.24 0.0000 |-- |
19 0.3436 -0.1511 850.79 0.0000 |-- -|
20 0.3127 0.0665 862.17 0.0000 |-- |
21 0.2793 0.1352 871.39 0.0000 |-- |-
22 0.2459 -0.1130 878.65 0.0000 |- |
23 0.2138 0.0436 884.22 0.0000 |- |
24 0.1820 0.1300 888.31 0.0000 |- |-
25 0.1527 0.1125 891.25 0.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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index