
Last chance! 50% off unlimited learning
Sale ends in
This shows which IVs are selected in the naivereg function.
IVselect(
z,
x,
max.degree = 10,
criterion = c("BIC", "AIC", "GCV", "AICc", "EBIC"),
df.method = c("default", "active"),
penalty = c("grLasso", "grMCP", "grSCAD", "gel", "cMCP"),
endogenous.index = c(),
IV.intercept = FALSE,
family = c("gaussian", "binomial", "poisson")
)
The instrument variables matrix.
The design matrix.
The upper limit value of degree of B-splines when using BIC/AIC to choose the tuning parameters, default is BIC.
The criterion by which to select the regularization parameter. One of "AIC", "BIC", "GCV", "AICc","EBIC", default is "BIC".
How should effective model parameters be calculated? One of: "active", which counts the number of nonzero coefficients; or "default", which uses the calculated df returned by grpreg, default is "default".
The penalty to be applied to the model. For group selection, one of grLasso, grMCP, or grSCAD. For bi-level selection, one of gel or cMCP. Default is " grLasso".
Specify which variables in design matrix are endogenous variables, the variable corresponds to the value 1 is endogenous variables, the variable corresponds to the value 0 is exogenous variable, default is all endogenous variables.
Intercept of instrument variables, default is <U+201C>FALSE<U+201D>.
Either "gaussian" or "binomial", depending on the response, default is "gaussian".
An object of type IVselect
which is a list with the following
components:
Degree of B-splines.
The criterion by which to select the regularization parameter. One of "AIC", "BIC", "GCV", "AICc", "EBIC", default is "BIC".
The index of selected instrument variables.
The index of selected instrument variables after B-splines.
The instrument variables after B-splines.
See naivereg.
Q. Fan and W. Zhong (2018), <U+201C>Nonparametric Additive Instrumental Variable Estimator: A Group Shrinkage Estimation Perspective,<U+201D> Journal of Business & Economic Statistics, doi: 10.1080/07350015.2016.1180991.
Caner, M. and Q. Fan (2015), Hybrid GEL Estimators: Instrument Selection with Adaptive Lasso, Journal of Econometrics, 187, 256<U+2013>274.
# NOT RUN {
#IV selecting with group Lasso an B-splines
library(naivereg)
data("naivedata")
x=naivedata[,1]
y=naivedata[,2]
z=naivedata[,3:22]
IV = IVselect(z,x)
IV$IVselect #show the IV selected after B-splines
# }
Run the code above in your browser using DataLab