explosion of several sequences of variables
[mats,names,prests,b,nonna]=explon(vars,named,b,testna,dropna,mindat)
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
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
[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. | ![]() | ![]() |