Linear regression with the Lin (2013) covariate adjustment

lm_lin(formula, data, covariates, weights, subset, clusters, se_type = NULL,
  ci = TRUE, alpha = 0.05, coefficient_name = NULL, return_vcov = TRUE)

Arguments

formula

An object of class "formula", such as Y ~ Z. Should only have the outcome and the treatment.

data

A data.frame.

covariates

A one-sided formula with all of the covariates on the right hand side, such as ~ x1 + x2 + x3.

weights

the bare (unquoted) names of the weights variable in the supplied data.

subset

An optional bare (unquoted) expression specifying a subset of observations to be used.

clusters

An optional bare (unquoted) name of the variable that corresponds to the clusters in the data.

se_type

The sort of standard error sought. Without clustering: "HC0", "HC1", "HC2" (default), "HC3", or "classical". With clustering: "BM" (default), "stata".

ci

A boolean for whether to compute and return pvalues and confidence intervals, TRUE by default.

alpha

The significance level, 0.05 by default.

coefficient_name

a character or character vector that indicates which coefficients should be reported. If left unspecified, returns all coefficients.

return_vcov

a boolean for whether to return the vcov matrix for later usage, TRUE by default.