plugin_lasso_int: Iceberg Lasso Implementation (in development)

View source: R/iceberg.R

plugin_lasso_intR Documentation

Iceberg Lasso Implementation (in development)

Description

This is the internal function upon which the iceberg wrapper is built. It performs standard plugin lasso PPML estimation without fixed effects, relying on glmnet::glmnet. As the other internals in the package, it needs a y vector and an x matrix.

Usage

plugin_lasso_int(
  y,
  x,
  tol = 1e-08,
  glmnettol = 1e-12,
  penweights = NULL,
  colcheck = FALSE,
  K = 50,
  verbose = FALSE,
  lambda = NULL,
  icepost = FALSE
)

Arguments

y

Dependent variable (a vector).

x

Regressor matrix.

tol

Tolerance parameter for convergence of the IRLS algorithm.

glmnettol

Tolerance parameter to be passed on to glmnet::glmnet.

penweights

Optional: a vector of coefficient-specific penalties to use in plugin lasso.

colcheck

Logical. If TRUE, checks for perfect multicollinearity in x.

K

Maximum number of iterations.

verbose

Logical. If TRUE, prints information to the screen while evaluating.

lambda

Penalty parameter (a number).

icepost

Logical. If TRUE, it carries out a post-lasso estimation with just the selected variables and reports the coefficients from this regression.

Value

A list with 14 elements, including beta, which is the only one we use in the wrapper. For a full list, see glmnet.


penppml documentation built on Sept. 8, 2023, 5:58 p.m.