Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Granger causality test in Stata10
From
Muhammad Anees <[email protected]>
To
[email protected]
Subject
Re: st: Granger causality test in Stata10
Date
Mon, 8 Aug 2011 08:21:46 +0500
That is because you have default time series operator in stata. You
can create the lagged variables using stata's
gen lag1xvar=l.xvar
gen lag2xvar=l2.xvar
and so on
then use the same previous command, hope you get what you want.
On Sun, Aug 7, 2011 at 9:19 PM, Merijn Groenenboom
<[email protected]> wrote:
> Thanks again Anees! I feel I am very close now...
>
> My vec regression now is:
>
> vec d.lstp d.lexr l.d.lexr l2.d.lexr d.lsint l.d.lsint l2.d.lsint
> d.lip l.d.lip l2.d.lip d.lur l.d.lur l2.d.lur d.lyie l.d.lyie
> l2.d.lyie d.loil l.d.loil l2.d.loil d.lcon l.d.lcon l2.d.lcon d.lgold
> l.d.lgold l2.d.lgold d.ltb l.d.ltb l.2.d.ltb d.linf l.d.linf
> l.2.d.linf
>
> After that I want to test for example lexr, as you recommanded:
>
> test (d.lexr=0) (l.d.lexr=0) (l2.d.lexr=0)
>
> However then Stata10 sais:
> d.lexr not found
>
> How is this possible?
>
> Thanks in advance for your reply!
>
> MerijnG
>
> 2011/8/6 Muhammad Anees <[email protected]>:
>> For example you want to include lags into the system, your command should appear
>>
>> vec yvar d.xvar1 l.d.xvar l2.d.xvar d.xvar2 l.d.xvar2 l2.d.xvar and so on
>> test granger causality using
>>
>> test (d.xvar1=0) (l.d.xvar=0) (l2.d.xvar=0) and so on for other set of xvars.
>>
>>
>> On Fri, Aug 5, 2011 at 3:21 PM, Merijn Groenenboom
>> <[email protected]> wrote:
>>> Thanks for the help Muhammad!
>>>
>>> Only one more question about the command with the lags:
>>>
>>> Lets say my y variable= d.lstp and my x variables are d.lexr and d.lgold.
>>> I use a lag of 3 for both variables.
>>> What should I type in Stata?
>>> vec d.lstp d.lexr.......
>>> How can i include lags in the middle of the regression? What command
>>> should i use?
>>>
>>> Thanks in advance for the help!
>>>
>>> 2011/8/5 Muhammad Anees <[email protected]>:
>>>> Granger causality is tested using F or Modiffied Wald Chi2
>>>> statistitic. You can try the -test- command on the respective
>>>> variables after your regression command.
>>>>
>>>> vec yvar xvar1with lags xvar2withlags xvar3withlags
>>>> test xvar1withlags
>>>>
>>>> will give you the causality statistic for xvar1 and its included lag.
>>>> This way you have to keep mind the routine of hypothesis for Granger
>>>> causality
>>>>
>>>> Hope It explains the answer
>>>>
>>>> Anees
>>>>
>>>> On Thu, Aug 4, 2011 at 1:07 PM, Merijn Groenenboom
>>>> <[email protected]> wrote:
>>>>> Dear Statalisters,
>>>>>
>>>>> I am writing a research about the effect of economic indicators on stock prices.
>>>>> Granger causality test is one of the tests I want to use.
>>>>> I started with the following command in Stata10:
>>>>>
>>>>> quietly var d.lstp d.lexr d.lsint d.lip d.lur d.lyie d.lm1 d.loil d.lcon
>>>>> d.lgold d.ltb d.linf, lags(1/2)
>>>>> vargranger
>>>>>
>>>>> However the results showed spurious results, since all variables are
>>>>> only stationary at first differences and cointegration exists
>>>>> I should use a vec model instead of a var model.
>>>>> So I used the following command:
>>>>> vec d.lstp d.lexr d.lsint d.lip d.lur d.lyie d.lm1 d.loil d.lcon
>>>>> d.lgold d.ltb d.linf, lags(1/2)
>>>>>
>>>>> However I am not sure about the next step. How does Stata show me the
>>>>> results of granger causality test now?
>>>>> Or did I already make a mistake before?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Merijn G
>>>>> *
>>>>> * For searches and help try:
>>>>> * http://www.stata.com/help.cgi?search
>>>>> * http://www.stata.com/support/statalist/faq
>>>>> * http://www.ats.ucla.edu/stat/stata/
>>>>>
>>>>
>>>> *
>>>> * For searches and help try:
>>>> * http://www.stata.com/help.cgi?search
>>>> * http://www.stata.com/support/statalist/faq
>>>> * http://www.ats.ucla.edu/stat/stata/
>>>>
>>>
>>> *
>>> * For searches and help try:
>>> * http://www.stata.com/help.cgi?search
>>> * http://www.stata.com/support/statalist/faq
>>> * http://www.ats.ucla.edu/stat/stata/
>>>
>>
>>
>>
>> --
>>
>>
>> Regards
>>
>> Anees
>>
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/statalist/faq
>> * http://www.ats.ucla.edu/stat/stata/
>>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
--
Regards
Anees
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/