iode.Equations.i

property Equations.i: PositionalIndexer

Allow to select the ith equation in the database.

Examples

>>> from iode import equations, SAMPLE_DATA_DIR
>>> equations.load(f"{SAMPLE_DATA_DIR}/fun.eqs")
Loading .../fun.eqs
274 objects loaded 
>>> # get the first equation
>>> equations.i[0]
Equation(endogenous = 'ACAF',
        lec = '(ACAF/VAF[-1]) :=acaf1+acaf2*GOSF[-1]+\nacaf4*(TIME=1995)',
        method = 'LSQ',
        from_period = '1980Y1',
        to_period = '1996Y1',
        block = 'ACAF',
        tests = {corr = 1,
                dw = 2.32935,
                fstat = 32.2732,
                loglik = 83.8075,
                meany = 0.00818467,
                r2 = 0.821761,
                r2adj = 0.796299,
                ssres = 5.19945e-05,
                stderr = 0.00192715,
                stderrp = 23.5458,
                stdev = 0.0042699},
        date = '12-06-1998')
>>> # get the last equation
>>> equations.i[-1]
Equation(endogenous = 'ZZF_',
        lec = 'ZZF_ := ZZF_[-1]',
        method = 'LSQ',
        comment = ' ',
        block = 'ZZF_')
>>> # update first equation
>>> equations.i[0] = "(ACAF/VAF[-1]) := acaf1 + acaf2 * GOSF[-1] + acaf4*(TIME=1995)"
>>> equations.i[0]
Equation(endogenous = 'ACAF',
        lec = '(ACAF/VAF[-1]) := acaf1 + acaf2 * GOSF[-1] + acaf4*(TIME=1995)',
        method = 'LSQ',
        from_period = '1980Y1',
        to_period = '1996Y1',
        block = 'ACAF',
        tests = {corr = 1,
                dw = 2.32935,
                fstat = 32.2732,
                loglik = 83.8075,
                meany = 0.00818467,
                r2 = 0.821761,
                r2adj = 0.796299,
                ssres = 5.19945e-05,
                stderr = 0.00192715,
                stderrp = 23.5458,
                stdev = 0.0042699},
        date = '12-06-1998')
>>> # update last equation
>>> equations.i[-1] = "ZZF_ := ZZF_[-1] + 1"
>>> equations.i[-1]
Equation(endogenous = 'ZZF_',
        lec = 'ZZF_ := ZZF_[-1] + 1',
        method = 'LSQ',
        comment = ' ',
        block = 'ZZF_')