<< balance_identity Contributions contrib_logq2gra >>

Grocer >> Contributions > contrib

contrib

contribution of an exogenous variable

CALLING SEQUENCE

[contrib_x]=contrib(vari,mainf_proxy)

PARAMETERS

Input

* vari = the exogenous variable, either a ts, a vector or such an object

* mainf_proxy = the nbterms first terms of the Infinite Moving average

* dropna = 'dropna' if the user wants to remove the NA values from the data (optional)

 

Output

* contrib_x = the vector of contributions

DESCRIPTION

Calculates contribution of variable vari to the evolution of an endogenous variable, with response function mainf_proxy.

EXAMPLE

load(GROCERDIR+'/macros/grocer/db/bdhenderic.dat');
rnet_mainf=mainf([1-0.1746071-0.0928556 ; 0.1746071],-0.6296264);
rnet_contrib=contrib(delts(rnet),rnet_mainf)
 
load(GROCERDIR+'/macros/grocer/db/bdhenderic.dat');
rnet_mainf=mainf([1-0.1746071-0.0928556 ; 0.1746071],-0.6296264,107);rnet_contrib=contrib(delts(rnet),rnet_mainf)
 
// The two examples calculate the contribution of the interest rate to the delta of logarithm of m1 according to Hendry and Ericsson
// model (estimated by grocer function hendryericsson(). In the first one, the moving average approximation has been calculated
// only for the 100 first terms (default of mainf); Therefore contrib has given the message "WARNING:# of terms in the response
// function are lower than the # of observations". In the second example, this number of terms has been adjusted to the length
// of the ts and the warning message no longer occurs.

AUTHOR

Eric Dubois 2004

Report an issue
<< balance_identity Contributions contrib_logq2gra >>