coef.rlassoIVselectZ {hdm} | R Documentation |
Coefficients from S3 objects rlassoIVselectZ
Description
Method to extract coefficients from objects of class rlassoIVselectZ
.
Usage
## S3 method for class 'rlassoIVselectZ'
coef(object, complete = TRUE, selection.matrix = FALSE, ...)
Arguments
object |
an object of class |
complete |
general option of the function |
selection.matrix |
if TRUE, a selection matrix is returned that indicates the selected variables from each first stage regression. Default is set to FALSE. See section on details for more information. |
... |
further arguments passed to functions coef. |
Details
Printing coefficients and selection matrix for S3 object rlassoIVselectZ
. The columns of the selection matrix report the selection index for the first stage lasso regressions as specified
rlassoIVselectZ
command, i.e., the selected variables for each of the endogenous variables. "x"
indicates that a variable has been selected, i.e., the corresponding estimated coefficient is different from zero.
The very last column collects all variables that have been selected in at least one of the lasso regressions.
Examples
## Not run:
lasso.IV.Z = rlassoIVselectZ(x=x, d=d, y=y, z=z)
data(EminentDomain)
z <- EminentDomain$logGDP$z # instruments
x <- EminentDomain$logGDP$x # exogenous variables
y <- EminentDomain$logGDP$y # outcome varialbe
d <- EminentDomain$logGDP$d # treatment / endogenous variable
lasso.IV.Z = rlassoIVselectZ(x=x, d=d, y=y, z=z)
coef(lasso.IV.Z) # Default behavior
coef(lasso.IV.Z, selection.matrix = T)
## End(Not run)