FAVAR add-in

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

dakila
Posts: 370
Joined: Tue Nov 24, 2015 4:57 pm

Re: FAVAR add-in

Postby dakila » Mon May 06, 2019 7:51 pm

Yes, it is right. Use scale (1 or 0) and sn (scale number) command. For example,

Code: Select all

favar(factor=3,horizon=60,rep=1000,ci=0.9,vd=1, scale=1, sn=0.25) 13 xdata xslow xir tcode yx_name @ ffr

heer0
Posts: 7
Joined: Sat May 04, 2019 11:23 am

Re: FAVAR add-in

Postby heer0 » Wed May 08, 2019 7:29 am

dakila wrote:Yes, it is right. Use scale (1 or 0) and sn (scale number) command. For example,

Code: Select all

favar(factor=3,horizon=60,rep=1000,ci=0.9,vd=1, scale=1, sn=0.25) 13 xdata xslow xir tcode yx_name @ ffr


That's great thanks so much. Quick follow-up question: in your reply, you set the scaling factor to 0.25, which I suppose changes the magnitude of the one-period shock from one standard deviation of the impulse variable (e.g., ffr) to a 25 bps increase. Would I need to set sn equal to 0.25/std(ffr) if I estimated the FAVAR with non-standardized data?

I would also like to know if the "favar" command allows for the inclusion of a constant and a linear time trend as in the standard EViews command for estimating a VAR, i.e.

Code: Select all

favar(factor=3,horizon=60,rep=1000,ci=0.9,vd=1, scale=1, sn=0.25) 13 xdata xslow xir tcode yx_name c @trend @ ffr


Finally, I would like to know if the inclusion of the transformation codes in the "favar" command automatically backs out impulse responses for the "untransformed" variables. For example, we often tranform GDP by taking logs and then first differences such that GDP enters in growth rates rather than levels. Would the corresponding impulse response function from the "favar" command show the change in the level of GDP in USD in response to a monetary policy shock? Or would the impulse response function just accumulate the changes in the growth rates such that the Y-axis shows the relative change in GDP (i.e., %-change)?

Thanks so much for taking the time to answer all my questions!!

dakila
Posts: 370
Joined: Tue Nov 24, 2015 4:57 pm

Re: FAVAR add-in

Postby dakila » Sat May 11, 2019 3:45 am

Would I need to set sn equal to 0.25/std(ffr) if I estimated the FAVAR with non-standardized data?

I think you need to set sn equal to 0.25/std(ffr) if you estimated the FAVAR with standardized data.

I would also like to know if the "favar" command allows for the inclusion of a constant and a linear time trend as in the standard EViews command for estimating a VAR, i.e.

No it does not allow a linear time trend. It automatically includes a constant.

Would the corresponding impulse response function from the "favar" command show the change in the level of GDP in USD in response to a monetary policy shock? Or would the impulse response function just accumulate the changes in the growth rates such that the Y-axis shows the relative change in GDP (i.e., %-change)?

% -change

heer0
Posts: 7
Joined: Sat May 04, 2019 11:23 am

Re: FAVAR add-in

Postby heer0 » Mon May 13, 2019 2:55 am

dakila wrote:
Would I need to set sn equal to 0.25/std(ffr) if I estimated the FAVAR with non-standardized data?

I think you need to set sn equal to 0.25/std(ffr) if you estimated the FAVAR with standardized data.

I would also like to know if the "favar" command allows for the inclusion of a constant and a linear time trend as in the standard EViews command for estimating a VAR, i.e.

No it does not allow a linear time trend. It automatically includes a constant.

Would the corresponding impulse response function from the "favar" command show the change in the level of GDP in USD in response to a monetary policy shock? Or would the impulse response function just accumulate the changes in the growth rates such that the Y-axis shows the relative change in GDP (i.e., %-change)?

% -change


Thank you so much for your detailed response. Much appreciated!

Fondel
Posts: 2
Joined: Thu Jun 06, 2019 10:44 pm

Re: FAVAR add-in

Postby Fondel » Mon Jun 10, 2019 12:29 am

First of all, thank you for this Add-in, surely made my life easier!

I am new to eviews and considerably new to stats in general.

Few questions for which I couldnt find an answer in this thread:

1. Is it possible to forecast individual series used to build factors? (not just factors themselves)
2. Is it possible to draw factors from multiple datasets? Let's say I have sets X1 and X2 composed of different data series and I would like to use the first principal component of each (X1 and X2) in my FAVAR as factors?

Thanks

dakila
Posts: 370
Joined: Tue Nov 24, 2015 4:57 pm

Re: FAVAR add-in

Postby dakila » Tue Jun 11, 2019 3:09 pm

1. Is it possible to forecast individual series used to build factors? (not just factors themselves)

Yes . this question is answered before

Is it possible to draw factors from multiple datasets? Let's say I have sets X1 and X2 composed of different data series and I would like to use the first principal component of each (X1 and X2) in my FAVAR as factors?

No.

dakila
Posts: 370
Joined: Tue Nov 24, 2015 4:57 pm

Re: FAVAR add-in

Postby dakila » Tue Jun 11, 2019 5:45 pm

dakila wrote:
1. Is it possible to forecast individual series used to build factors? (not just factors themselves)

Yes . this question was answered before

Is it possible to draw factors from multiple datasets? Let's say I have sets X1 and X2 composed of different data series and I would like to use the first principal component of each (X1 and X2) in my FAVAR as factors?

No.

Fondel
Posts: 2
Joined: Thu Jun 06, 2019 10:44 pm

Re: FAVAR add-in

Postby Fondel » Fri Jun 14, 2019 1:53 am

dakila wrote:
dakila wrote:
1. Is it possible to forecast individual series used to build factors? (not just factors themselves)

Yes . this question was answered before

Is it possible to draw factors from multiple datasets? Let's say I have sets X1 and X2 composed of different data series and I would like to use the first principal component of each (X1 and X2) in my FAVAR as factors?

No.


Hello,

Thanks for your answers. I do find a relating question:

Kiyoshi wrote:Thank you for your comments, dakila. I know we can see the forecasting variables on factors. Moreover, I would like to know the forecasting for the original variables (x variables from which we extract factors). I guess I have to know the details of the program in order to get the forecasting for every variables.


Maybe I am missing something here and we both were and are confused.

dakila wrote:after the estimation you should use the following command:

Code: Select all

favar01.forecast(prompt)

then you should regress the forecasting variable on factors and ffr:

Code: Select all

eq01.ls series108 _facrot1 _facrot2 _facrot3 ffr
eq01.forecast

Keep in the mind all variables are standardized (zero mean and unit variance).
Therefore you shoud transform your variable back to the non-standardized one.


You must be refering to this.

The command

Code: Select all

favar01.forecast(prompt)
returns "_facrot1_f, _facrot2_f and _facrot3_f"
In the "eq01.ls series108 _facrot1 _facrot2 _facrot3 ffr" am I supposed to replace _facrot1...2 with _facrot1_f.....3_f?
forecasting the least square model without introducing any output from the favar forecast done above seems counter intuitive.. Is it that the above forecast using the favar model is forecasting for the facotrs and below (the ls eq) is forecasting for variables themselves?

After forecasting I will unstandardize my results.

Sorry for my newb. questions!

Thank you.

heer0
Posts: 7
Joined: Sat May 04, 2019 11:23 am

Re: FAVAR add-in

Postby heer0 » Thu Jun 20, 2019 12:06 pm

dakila wrote:
Would I need to set sn equal to 0.25/std(ffr) if I estimated the FAVAR with non-standardized data?
I think you need to set sn equal to 0.25/std(ffr) if you estimated the FAVAR with standardized data
.

Hi dakila,

thanks so much for your quick response. Just to make sure we mean the same thing: when I say standardized data, I am referring to the observable policy variables, not the original macroeconomic time series from which the factors are constructed. The informational time series are recommended to be standardized in any case.

Thank you so much in advance!

heer0
Posts: 7
Joined: Sat May 04, 2019 11:23 am

Re: FAVAR add-in

Postby heer0 » Thu Jun 20, 2019 12:56 pm

dakila wrote:"ROT" means the rotated factors. In order to estimate the factors do the following steps:
1) estimate factors (C) using all variables except FFR (you did this step)
2) estimate slow moving factors (Fs) from the slow moving variables.
3) estimate the regression by OLS : C=b1*Fs + b2*FFR + e
4) estimate the rotated factors : C-b2*FFR


Hi dakila,

given your reply to adriana a couple of years back, I was wondering why exactly we would need to follow steps 1 to 4 separately? If I understood the example file correctly, factor estimation and rotation is taken care of in the background when executing your brilliant favar command. Would you agree?

Secondly, I would also like to double check that the observable factors (=policy variables, such as ffr) must not be included in the data set from which the principal components are to be extracted (compare your step 1) above).

Thirdly, in their working paper version, Bernanke et al. state that the number of principal components to be estimated from their macro data set is equal to K + M (the number of unobservable factors plus the number of policy variables included). Since I would like to estimate a FAVAR with three observale policy variables, I would first determine the appropriate number of unobservable factors to be estimated by a scree plot or numerical criterion, such as IC_2(K). Finally, I would add the number of policy variables (M = 3) to the result given by the scree plot or IC_2(K) such that I would estimate K + 3 factors rather than just K. Would you agree?

Fourthly, I would like to know how to set the ordering (in the Cholesky sense of the word) in the FAVAR by code. Suppose I seek to include three observable policy variables called Yt_1, Yt_2 and Yt_3. Economic theory stipulates that their ordering be (1) Yt_3, (2) Yt_2, (3) Yt_1. Would the command to derive impulse response functions for the Yt_2 variable with the specified Cholesky ordering be:

Code: Select all

favar(factor=6,horizon=48,rep=1000,ci=0.9, impulse=Yt_2) 13 xdata xslow xir tcode yx_name @ Yt_3 Yt_2 Yt_1
?

Fifthly, I would like to ascertain that the macro data used to estimate the unobservable factors is made stationary before the favar command. And that the vector of transformation codes reflects the transformations applied to the variables for which impulse responses are to be derived. In other words, the transformation codes following the favar command are there only to determine whether cumulative impulse responses should be calculated or not. Would you agree?

And lastly (thanks for making it so far!), I would like to know if it is possible to specify particular variables as exogenous (for robustness checks)? I know this question has been asked before but I don't believe it has been answered yet.

Thank you SO MUCH in advance for answering my questions.

All help will be much appreciated!


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 2 guests