iode.Equation
- class iode.Equation(endogenous: str, lec: str, method: EqMethod | str = EqMethod.LSQ, from_period: str | Period = None, to_period: str | Period = None, comment: str = '', instruments: str = '', block: str = '')[source]
IODE equation.
- Parameters:
- endogenous: str
Name of the endogenous variable. It must the same as the name of the present equation in the Equations database.
- lec: str
LEC expression of the equation.
- method: EqMethod or str, optional
Method used to estimate the coefficients of the equation. Defaults to LSQ.
- from_period: str or Period, optional
Starting period for the estimation. Defaults to the starting period of the sample associated with the IODE Variables database.
- to_period: str or Period, optional
Ending period for the estimation. Defaults to the ending period of the sample associated with the IODE Variables database.
- comment: str, optional
Defaults to empty.
- instruments: str, optional
Defaults to empty.
- block: str, optional
block of equations (to estimate) to which the equation belong. Defaults to empty.
- Attributes:
- endogenous: str
name of the endogenous variable. It must the same as the name of the present equation in the Equations database.
- lec: str
LEC expression of the equation.
- method: EqMethod
- estimation method. Possible values are:
LSQ
ZELLNER
INSTRUMENTAL
GLS
MAX_LIKELIHOOD
- sample: Sample
estimaton sample.
- comment: str
- instruments: str
estimation instruments.
- block: str
block of equations (to estimate) to which the equation belong.
- tests: dict(str, float)
tests values associated with the estimation of the equation.
- date: str
last time the equation has been estimated.
Methods
copy()Return a copy of the current Equation.
estimate([from_period, to_period, quiet])Estimate the present equation.
get_formated_date([format])Return the date of last estimation in a given format.
Split an equation into its left-hand side and its right-hand side.
get_instance
Examples
>>> from iode import Equation, variables >>> variables.sample = "1960Y1:2015Y1" >>> eq_ACAF = Equation("ACAF", "(ACAF / VAF[-1]) := acaf1 + acaf2 * GOSF[-1] + acaf4 * (TIME=1995)") >>> eq_ACAF Equation(endogenous = 'ACAF', lec = '(ACAF / VAF[-1]) := acaf1 + acaf2 * GOSF[-1] + acaf4 * (TIME=1995)', method = 'LSQ', from_period = '1960Y1', to_period = '2015Y1')
- __init__(endogenous: str, lec: str, method: EqMethod | str = EqMethod.LSQ, from_period: str | Period = None, to_period: str | Period = None, comment: str = '', instruments: str = '', block: str = '') Self[source]
Methods
__init__(endogenous, lec[, method, ...])copy()Return a copy of the current Equation.
estimate([from_period, to_period, quiet])Estimate the present equation.
get_formated_date([format])Return the date of last estimation in a given format.
get_instance()Split an equation into its left-hand side and its right-hand side.
Attributes
Estimation block of equations to which the equation belongs.
Return the list of coefficients present in the current equation.
Equation comment.
dateDate of the last estimation.
Instrument(s) used for the estimation.
LEC expression of the current equation.
Estimation method.
Estimation sample of the current equation.
Estimation tests.
Return the list of variables present in the equation.