↧
converting incremental monthly series to quarterly
↧
How to enter data into a panel workfile.
Hello Gareth,
I have not used eviews for panel regressions before and need some help setting up a panel workfile.
I am trying to set up a workfile for 52 US states for six variables over 1979-2015 at a quarterly frequency.
I am fetching all the data from the Haver database using an Eviews programe as I want future updates to be made as quickly as possible.
I have seen that you have given some detailed examples on how to turn excel files into panel workfiles, but not if the data is imported directly from the database. Sorry if I missed sth. Can you help with this question please?
Many thanks in advance.
I have not used eviews for panel regressions before and need some help setting up a panel workfile.
I am trying to set up a workfile for 52 US states for six variables over 1979-2015 at a quarterly frequency.
I am fetching all the data from the Haver database using an Eviews programe as I want future updates to be made as quickly as possible.
I have seen that you have given some detailed examples on how to turn excel files into panel workfiles, but not if the data is imported directly from the database. Sorry if I missed sth. Can you help with this question please?
Many thanks in advance.
↧
↧
How to enter data into a panel workfile.
↧
Time varying SVAR
Training sample is used for determining prior parameters of Time varying SVAR. There is no test for determining the number. It should be at least 30-40 depending on VAR size.
Because it uses training sample to estimate OLS VAR. In other words, training sample is not used for actual TVSVAR model. If you want use full sample, then you can use uninformative priors (flat) theoretically. But these option is not available for this add-in for the reason of convergence problem.
Lastly, you need to upgrade your Eviews to version 9.
Because it uses training sample to estimate OLS VAR. In other words, training sample is not used for actual TVSVAR model. If you want use full sample, then you can use uninformative priors (flat) theoretically. But these option is not available for this add-in for the reason of convergence problem.
Lastly, you need to upgrade your Eviews to version 9.
↧
Conditional VAR forecast
↧
↧
simultaneous editing of program files
↧
Date: current quarter
Hi
I want to generate a string with the current ended quarter.
these codes will do it:
%date=@date
genr adummy=@before(%date)
smpl if adummy<1
genr adummy= na
string aadate=adummy.@last
this gives me "2016Q2", which is what i want.
but, is there a more efficient way?
in contrast,
string aadate2=@datestr(@now-1, "yyyy:q")
yields "2016:3"
Thomas
I want to generate a string with the current ended quarter.
these codes will do it:
%date=@date
genr adummy=@before(%date)
smpl if adummy<1
genr adummy= na
string aadate=adummy.@last
this gives me "2016Q2", which is what i want.
but, is there a more efficient way?
in contrast,
string aadate2=@datestr(@now-1, "yyyy:q")
yields "2016:3"
Thomas
↧
Monte Carlo Simulation with AR(1)-Processes
Thank you, now it works with this code:
But has anyone an idea, how I could count the significant p-values with a loop?
Code:
!length = 480
!sample = 400
wfcreate HP u 1 !length
!mcmax = 1000
for !phi1 = 0 to 1 step 0.1
for !phi2 = 0 to 1 step 0.1
!phi110 = 10*!phi1
!phi210 = 10*!phi2
matrix (!mcmax) tstat_0!phi110!phi210
matrix (!mcmax) pwerte_0!phi110!phi210
for !i = 1 to !mcmax
'Beginn der MC-Simulation
smpl 1 1
genr y1 = 0
genr y2 = 0
smpl 2 !length
genr epsilon = @nrnd*0.0375
genr psi = @nrnd*0.15
y1 = !phi1*y1(-1)+epsilon
y2 = !phi2*y2(-1)+psi
smpl !length - !sample + 1 !length
'Schätzung
equation hptest.ls y1 y1(-1) y2(-1)
tstat_0!phi110!phi210(!i) = hptest.@tstat(2)
pwerte_0!phi110!phi210(!i) = hptest.@pval(2)
next
next
next
But has anyone an idea, how I could count the significant p-values with a loop?
↧
How to enter data into a panel workfile.
↧
↧
Bounds testing: error correction and additional variables
Dear all,
I estimated the following ARDL model and tested whether yt and x1t are cointegrated by means of bounds testing approach :
Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + θ0yt-1 + θ1x1t-1 + et
Bounds testing indicates that yt and x1t are cointegrated. When I estimated the corresponding error correction model (ECM), the coefficient of the error correction term (ϕ) lies between -1 and 0 and is statistically significant.
Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + ϕECTt-1 + et
where ECTt=yt-c0 -a1x1t - vt
However, when I introduce additional explanatory variables (z1 to z8) in the specification (ECM), the coefficient of the error correction term doesn't lie between -1 and 0 anymore.
The specification is now: Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + ϕECTt-1+ΣρkΔzk + et
k=1 to 8
Does this mean that I should have introduced the additional explanatory variables at the beginning of the procedure (before bounds testing) already? Should I test whether yt and x1t are cointegrated while considering the additional explanatory variables as exogenous variables?
Thank you so much for your help.
Here are my results:
I estimated the following ARDL model and tested whether yt and x1t are cointegrated by means of bounds testing approach :
Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + θ0yt-1 + θ1x1t-1 + et
Bounds testing indicates that yt and x1t are cointegrated. When I estimated the corresponding error correction model (ECM), the coefficient of the error correction term (ϕ) lies between -1 and 0 and is statistically significant.
Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + ϕECTt-1 + et
where ECTt=yt-c0 -a1x1t - vt
However, when I introduce additional explanatory variables (z1 to z8) in the specification (ECM), the coefficient of the error correction term doesn't lie between -1 and 0 anymore.
The specification is now: Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + ϕECTt-1+ΣρkΔzk + et
k=1 to 8
Does this mean that I should have introduced the additional explanatory variables at the beginning of the procedure (before bounds testing) already? Should I test whether yt and x1t are cointegrated while considering the additional explanatory variables as exogenous variables?
Thank you so much for your help.
Here are my results:
↧
Generating DGPs (genr or append)
↧
Conditional VAR forecast
↧
Bloomberg Date oddness
Hello
I'm using Enterprise 9.5 April 5 2016 build
I have a problem representing dates using Bloomberg data
Whenever I try to reference the observation date, eviews is returning the wrong date.
In this example (attached) the formula @date(spx) is missing a large number of days from the start of the series, which is in a dated workfile using a 5 day specification. The result is a date mismatch and a large number of NAs at the end of the series. I get the same problem using other formulae when trying the reference the observation date.
Thanks.
I'm using Enterprise 9.5 April 5 2016 build
I have a problem representing dates using Bloomberg data
Whenever I try to reference the observation date, eviews is returning the wrong date.
In this example (attached) the formula @date(spx) is missing a large number of days from the start of the series, which is in a dated workfile using a 5 day specification. The result is a date mismatch and a large number of NAs at the end of the series. I get the same problem using other formulae when trying the reference the observation date.
Thanks.
↧
↧
Conditional VAR forecast
↧
How to enter data into a panel workfile.
↧
Date: current quarter
↧
Generating DGPs (genr or append)
In your case they are identical (as shown below):
If Y depended on X and X depended on Y you would need to use the model.
Code:
create u 100
series e1 = nrnd
series e2=nrnd
smpl 1 2
series x=nrnd
series y=nrnd
!nrep = 1
smpl 3 @last
scalar rho = 0.3
scalar psi=0.2
FOR !REP=1 TO !NREP
genr x = 1 + x(-1) + rho * (x(-1)-x(-2)) + e1
genr y = 1 + y(-1) + rho * (y(-1)-y(-2)) + psi * (x(-1)-x(-2)) + e2
NEXT
FOR !REP=1 TO !NREP
model mod1
mod1.append x = 1 + x(-1) + rho * (x(-1)-x(-2)) + e1
mod1.append y = 1 + y(-1) + rho * (y(-1)-y(-2)) + psi * (x(-1)-x(-2)) + e2
mod1.solve
delete mod1
NEXT
show x x0 y y0
If Y depended on X and X depended on Y you would need to use the model.
↧
↧
Bloomberg Date oddness
The @date function does not return the dates associated with the observation from the original source (Bloomberg in this case). If you think of @date as a series, @date(series) returns the lead or lag of the @date series depending on the value of series.
If SPX came from the Bloomberg, the observations have already been match merged for you.
If you want the date series of your workfile, use
If SPX came from the Bloomberg, the observations have already been match merged for you.
If you want the date series of your workfile, use
Code:
series date = @date
↧
Graph is crooped to much when saving in emf-format
↧
Date: current quarter
↧