<< explolist General Functions for estimation explone >>

Grocer >> General Functions for estimation > explon

explon

explosion of several sequences of variables

CALLING SEQUENCE

[mats,names,prests,b,nonna]=explon(vars,named,b,testna,dropna,mindat,lags)

PARAMETERS

Input

* vars = list of n:

  - lists of variables

  - matrix of names of variables the variables being in the form of

    -> a timeseries

    -> a real vector,

    -> a real matrix or a string (the name of a variable with one of the types cited above, between quotes)

    -> a matrix of strings, each one being the name of a variable

    -> the string 'cte' or 'const' if the user wants a constant to be included automatically

* named = a (n x 1) or (1 x n) vector of strings representing the name that will be given to variables not entered between quotes

* b = a (2*p x 1) string vector (of dates) (optional: if not given the function either takes the existing bounds or determines the bounds suitable to the given series)

* testna = a boolean indicating whether the program will test the existence of na's values in the matrices of values y and x

* dropna = a boolean indicating whether the program should keep only lines of matrices y and x with non na values in both matrices (suppose that testna has been set to %f)

* mindat =

  - %t if the user wants to take the min and max dates over which any series exists

  - %f if the user wants to take the time period over which all series exist

* lags = a scalar, a (n x 1) vector, each coordinate indicating the lag needed for the corresponding elements in the list vars (usefule for functiosn that are of VAR type)

 

Output

* mats = a list of n (T x ki) matrices

* names = a list of n (ki x 1) matrices of names

* prests = a boolean indicating whether there is a ts in x

* boundsvarb = a (2*p x 1) string matrix (of dates)

* nonna = a (T x 1) vector indicating the indexes of non NA observations

DESCRIPTION

From any number of lists of variables (for instance: endogenous, exogenous, rhs endogenous and intruments in an iv estimation or endogenous, switching exogenous, non switching exogenous and a priori datation in a Markov switching estimation), which can be in various formats (matrices, vectors, ts,... strings representing such objects, lists of such objects), defines the corresponding matrices that will be used in an estimation process, the names that will be used for the display of results, and, if necessary, the bounds over which the estimation will be performed: this is a function useful mainly to develop new econometric functions. This is the more general fucntion of this sort: there is a function explone and explouniv that explodes respectively 1 and 2 lists of object. Over 3, you must use explon.

EXAMPLE

[grocer_mats,grocer_names,grocer_prests,grocer_b]=explon(list(grocer_endo,grocer_exo_com,grocer_exo_idio,grocer_MS_datation),['endogenous' 'swithing exog.' 'non swithing exog.' 'apriori_datation'])
grocer_y=grocer_mats(1)
grocer_z=grocer_mats(2)
grocer_x=grocer_mats(3)
grocer_MS_refdate=grocer_mats(4)
 
grocer_namey=grocer_names(1)
grocer_namez=grocer_names(2)
grocer_namex=grocer_names(3)
// example taken from function ms_reg. See how the matrices and names are recovered after the call to explon:
// grocer_y, grocer_z, grocer_x and grocer_MS_refdate are respectively the vector representing the a priori datation,
// the endogenous variables, the switching exogenous variables and non swithing exogenous variables. 

[grocer_mats,grocer_names,grocer_prests,grocer_b]=explon(list(grocer_namey0,grocer_endo,grocer_exo,grocer_ivar),...['endogenous' 'rhs endogenous' 'exogenous' 'instruments'])
// example taken from functions iv.

AUTHOR

Eric Dubois 2006-2009

Report an issue
<< explolist General Functions for estimation explone >>