Grocer Function
NAME
contrib - contribution of an exogenous variable
CALLING SEQUENCE
[contrib_x]=contrib(vari,mainf_proxy)
PARAMETERS
Input
-
vari = the exogenous varaible, either a ts, a vector or such an object
-
mainf_proxy = the nbterms first terms of the Infinite Moving average
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
1) load('SCI/macros/grocer/db/bdhenderic.dat'); rnet_mainf=mainf([1-0.1746071-0.0928556 ; 0.1746071],-0.6296264);rnet_contrib=contrib(delts(rnet),rnet_mainf)
2) load('SCI/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