Create a time trend
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
Create a time trend
Hi everyone,
I'm currently using C#.NET COM to execute EViews command.
But i have a problem.
I have a trend who count 588 data points and i want to create a time series who start at 1 and finish at 588 (the last count of my main trend).
How can i do that without using an "if next" statement? Now i'm using "series time_trend = @trend+1" because @trend start from 0 and to be sure i have tu create my own trend who start with the value 1.
Regards.
I'm currently using C#.NET COM to execute EViews command.
But i have a problem.
I have a trend who count 588 data points and i want to create a time series who start at 1 and finish at 588 (the last count of my main trend).
How can i do that without using an "if next" statement? Now i'm using "series time_trend = @trend+1" because @trend start from 0 and to be sure i have tu create my own trend who start with the value 1.
Regards.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Create a time trend
@trend is always starting from 0?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
-
- Posts: 101
- Joined: Tue Jun 29, 2010 7:09 am
Re: Create a time trend
Hello Gareth,
I would like to clarify a doubt: @trend starts from zero according to the range or the sample?
I've just run the function and realized that if sample < range, @trend starts from zero from the beginning of the range.
This happens with linear trends in cointegration estimations as well. Is there a way around this?
Many thanks!
I would like to clarify a doubt: @trend starts from zero according to the range or the sample?
I've just run the function and realized that if sample < range, @trend starts from zero from the beginning of the range.
This happens with linear trends in cointegration estimations as well. Is there a way around this?
Many thanks!
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Create a time trend
Help @trend
-
- Posts: 101
- Joined: Tue Jun 29, 2010 7:09 am
Re: Create a time trend
Thanks for your prompt reply.
I understand that one can specify @trend with the date where one would like to start, but what to do in the context of cointegration estimation where one chooses to use the specification with trend?
I just realized that in the context of ARDL estimation, the EC obtained in Proc->Make Cointegrating ... uses a trend initiated to the beginning of the range (and not to the beginning of the sample, as I was expecting). See excel file attached.
I understand that one can specify @trend with the date where one would like to start, but what to do in the context of cointegration estimation where one chooses to use the specification with trend?
I just realized that in the context of ARDL estimation, the EC obtained in Proc->Make Cointegrating ... uses a trend initiated to the beginning of the range (and not to the beginning of the sample, as I was expecting). See excel file attached.
- Attachments
-
- evw_trend.xlsx
- (18.54 KiB) Downloaded 547 times
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Create a time trend
Not really sure, but does it make any difference what the starting value of the trend is?
-
- Posts: 101
- Joined: Tue Jun 29, 2010 7:09 am
Re: Create a time trend
In this case, yes, as you can see in the file: column K (and L), gives the EC using a trend set at the beginning of the range, while column M gives the EC with trend set at beginning of sample.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Create a time trend
But does it matter as long as the trend uses in making the cointegrating relationship is the same trend that was used during estimation?
Follow us on Twitter @IHSEViews
-
- Posts: 80
- Joined: Sat Apr 22, 2017 8:23 pm
Re: Create a time trend
EViews Gareth wrote:But does it matter as long as the trend uses in making the cointegrating relationship is the same trend that was used during estimation?
Indeed. Any deterministic dynamics (such as trends) used in estimation, must be identical to those used in deriving the EC term, otherwise, the model being suggested where the trend in the EC term is initiated at 1 at time t=T1, although the model estimated was initiated at t=1, would imply missing estimates proportional in magnitude of the missing trend elements 1, ... , T1, thereby creating bias in the estimation of the remaining variables. Estimating the model under one sample, and then artificially restarting the trend in the EC term for a sub-sample of the estimation is theoretically incorrect.
-
- Posts: 101
- Joined: Tue Jun 29, 2010 7:09 am
Re: Create a time trend
Here's the problem I'm having, and the reason I started suspecting the trend issue.
I'm running ARDL estimation (including a linear trend) where I'm mostly interested in the long-run relationship.
I obtained the "Cointegration graph", but the scale do not make sense (it's way too big):
To double check, I got the "long-run" equation by running: long-run = dependent variable - cointeq
The implicit long-run is way off the scale of the dependent variable:
So, my suspicions are with the trend because when I run estimations using the full range, the scale of the "Cointegration graph" makes much more sense (-2% to 12%).
Unless the issue could be related to the fact that the constant disappears from the "levels equation":
Many thanks for your attention.
I'm running ARDL estimation (including a linear trend) where I'm mostly interested in the long-run relationship.
I obtained the "Cointegration graph", but the scale do not make sense (it's way too big):
To double check, I got the "long-run" equation by running: long-run = dependent variable - cointeq
The implicit long-run is way off the scale of the dependent variable:
So, my suspicions are with the trend because when I run estimations using the full range, the scale of the "Cointegration graph" makes much more sense (-2% to 12%).
Unless the issue could be related to the fact that the constant disappears from the "levels equation":
Many thanks for your attention.
-
- Posts: 80
- Joined: Sat Apr 22, 2017 8:23 pm
Re: Create a time trend
maragloria wrote:Here's the problem I'm having, and the reason I started suspecting the trend issue.
Could you provide the data you are working with in this example?
-
- Posts: 101
- Joined: Tue Jun 29, 2010 7:09 am
Re: Create a time trend
Please note that simple OLS regression (using the @trend function) and Johasen estimation (case 4) do not have the problem.
Who is online
Users browsing this forum: No registered users and 33 guests