3.8.6.3.3. statsmodels.nonparametric.kernel_regression.KernelCensoredReg¶
-
class
statsmodels.nonparametric.kernel_regression.
KernelCensoredReg
(endog, exog, var_type, reg_type, bw='cv_ls', censor_val=0, defaults=<statsmodels.nonparametric._kernel_base.EstimatorSettings object>)[source]¶ Nonparametric censored regression.
Calculates the condtional mean
E[y|X]
wherey = g(X) + e
, where y is left-censored. Left censored variable Y is defined asY = min {Y', L}
whereL
is the value at whichY
is censored andY'
is the true value of the variable.Parameters: endog: list with one element which is array_like
This is the dependent variable.
exog: list
The training data for the independent variable(s) Each element in the list is a separate variable
dep_type: str
The type of the dependent variable(s) c: Continuous u: Unordered (Discrete) o: Ordered (Discrete)
reg_type: str
Type of regression estimator lc: Local Constant Estimator ll: Local Linear Estimator
bw: array_like
Either a user-specified bandwidth or the method for bandwidth selection. cv_ls: cross-validaton least squares aic: AIC Hurvich Estimator
censor_val: float
Value at which the dependent variable is censored
defaults: EstimatorSettings instance, optional
The default values for the efficient bandwidth estimation
Attributes
———
bw: array_like
The bandwidth parameters
*Methods*
r-squared : calculates the R-Squared coefficient for the model.
fit : calculates the conditional mean and marginal effects.
3.8.6.3.3.1. Methods¶
__init__ (endog, exog, var_type, reg_type[, ...]) |
|
aic_hurvich (bw[, func]) |
Computes the AIC Hurvich criteria for the estimation of the bandwidth. |
censored (censor_val) |
|
cv_loo (bw, func) |
The cross-validation function with leave-one-out |
fit ([data_predict]) |
Returns the marginal effects at the data_predict points. |
loo_likelihood () |
|
r_squared () |
Returns the R-Squared for the nonparametric regression. |
sig_test (var_pos[, nboot, nested_res, pivot]) |
Significance test for the variables in the regression. |