Nabtheberliner wrote:Hello everyone,
i'm new with RATS software, i used to work with SAS. So my questions are simple:
How do we program RATS to get the ML estimators when we study a VAR(p) process?
With the OLS estimators, there is no problem.
Nabtheberliner wrote:My second question is : How do we write or obtain the Mean adjusted form of a VAR process?
Nabtheberliner wrote:Actually i'm studying the Helmut Lûtkepohl's book "New introduction to multiple time series analysis", so i'm finishing the fifth chapter, and try to do the exercices.
I'm dealing with a bivariate VAR(1).
He asks to compute the OLS/YULE-WALKER and ML Estimators
Concerning the 2 first estimators i have no problem.
Nabtheberliner wrote:I have a problem to compute the forecast MSE Matrix aswell.
SO if you have any idea, please let me know.
Thanks a lot
Nabtheberliner wrote:Dear Tom,
i send you here the programs for the exercices.There is a attached file called E2 from Lütkepohl.
You are right i wasn't precise enough, the matter is how do i get in the Problem 3.13 the estimation of the covariance matrix of the asymptotic distribution of the ML estimators.
Also what do mean by "worked examples for the book",do you mean the textbook programs provided by estima?
By the way do you have the book " New Intro To Multiple..." ?
Tahnks a lot for your help
Nabtheberliner wrote:PROGRAM
OPEN DATA "C:\Users\nabihamaraoui\Desktop\NEW INTRODUCTION TO MULTIPLE TIME SERIES ANALYSIS\E2.txt"
CALENDAR(Q) 1949:1
DATA(FORMAT=PRN,ORG=COLUMNS) 1949:01 1974:04 y1 y2
*PROBLEM 3.11:Plot thwo times series y1t and y2t and comment on the stationarity and stability of the series
spgraph(header=' series y1t and y2t',vfields=2,hfields=1,footer='figure 1') 2
graph(header='series y1t',vlabel='Y1',hlabel='dates',footer='panel:1',key=upleft) 1
# y1
graph(header='series y2t',vlabel='y2',hlabel='dates',footer='panel:2',key=upleft) 1
# y2
spgraph(done)
*PROBLEM 3.12: Estimate the parameters of a VAR(1) model for(y1t,y2t)' using multivaiate
*LS,that is compute B^(coefficient matrix) and SIGMA^u(residual cov matrix).
*comment the stability of the estimated process
system(model=US)
variables y1 y2
lags 1
det constant
end(system)
estimate(sigma,outsigma=V) * 1968:4
* This will give the roots of the companion matrix, which will be the
* reciprocals of the roots of the polynomial in the text. Thus, the
* stability condition is for the largest (first in the order produced by
* EIGEN) to be less than one.
*
compute companion=%modelcompanion(US)
eigen(cvalues=cv) companion
disp cv(1) "with absolute value" %cabs(cv(1))
*
* We can notice that the coefficients are not good,in the first regression
*with y1 as dependent variable, the coef of y1(1)=1.013
* and we check with roots of the companion matrix which are greater than 1
* so the estimated VAr(1) process is not stable
*
*PROBLEM 3.13: Use the adjusted-mean form of the VAR(1) model and estimate the
*the coefficients .Assume that the data generation process is Gaussian and
*estimatthe covariance matrix of the asymptotic distribution of the ML estimators
* first i get the sample mean
table
*i substract the sample mean from the data
set y1t = y1 - 110.8990
set y2t = y2 - 6.0980
Nabtheberliner wrote:Hello Tom,
Thanks it workx perfectly!
A quick question 'cause i'm jumping from SAS to RATS, it's not easy, so my question is:
the options outsigma is supposed to provide the covariance matrix of the residuals, why in the output it is named Covariance\Correlation Matrix of Coefficient?it's a bit confusing,unless i missunderstood if so sorry for that.
Best regards
Nabtheberliner wrote:Thanks Tom,
Now i'm very clear about what is inside the output.
Yet, it remains a little confusion.
Indeed, in the RATS Handbook, W.Enders discribes the outsigma as the covariance matrix of the residuals, so my confusion is coefficients and residuals, more precisely
do i have to consider that covariance matrix of the residuals and the covariance matrix of the coefficients are the same? which looks strange for me.
Sorry if it has to be obvious.
Thanks Tom
OPEN DATA "C:\Users\naceur\Desktop\econometrics time series\NEW INTRO TO MULTIPLE TIME SERIES ANALYSIS\etude1 West german economy Lütkepôhl\westgermaneco.txt"
CALENDAR(Q) 1960:1
DATA(FORMAT=PRN,ORG=COLUMNS) 1960:01 1982:04 invest income cons
set ldinvest = log(invest / invest{1})
set ldincome = log(income / income{1})
set ldcons = log(cons / cons{1})
system(model=L)
variables ldinvest ldincome ldcons
lags 1 to 2
det constant
end(system)
estimate(sigma,outsigma=V) * 1978:4
display %outsigma=Vdisplay "Rescaled Covariance Matrix" 1.0e+4*%sigma*%nobs/(%nobs-%nreg)display %kroneker(%sigma,%xx)disp %kroneker(%sigma,%xx)disp %kroneker(%sigma,%xx)
Return to Other Time Series Analysis
Users browsing this forum: No registered users and 0 guests