6.5.5.3.6. statsmodels.sandbox.nonparametric.kernel_extras.TestFForm

class statsmodels.sandbox.nonparametric.kernel_extras.TestFForm(endog, exog, bw, var_type, fform, estimator, nboot=100)[source]

Nonparametric test for functional form.

Parameters:

endog: list

Dependent variable (training set)

exog: list of array_like objects

The independent (right-hand-side) variables

bw: array_like, str

Bandwidths for exog or specify method for bandwidth selection

fform: function

The functional form y = g(b, x) to be tested. Takes as inputs the RHS variables exog and the coefficients b (betas) and returns a fitted y_hat.

var_type: str

The type of the independent exog variables:

  • c: continuous
  • o: ordered
  • u: unordered

estimator: function

Must return the estimated coefficients b (betas). Takes as inputs (endog, exog). E.g. least square estimator:

lambda (x,y): np.dot(np.pinv(np.dot(x.T, x)), np.dot(x.T, y))

References

See Racine, J.: “Consistent Significance Testing for Nonparametric Regression” Journal of Business & Economics Statistics.

See chapter 12 in [1] pp. 355-357.

__init__(endog, exog, bw, var_type, fform, estimator, nboot=100)[source]

6.5.5.3.6.1. Methods

__init__(endog, exog, bw, var_type, fform, ...)