cowboy_glm: Run glm with Lasso prescreening built into boostrapped...

cowboy_glmR Documentation

Run glm with Lasso prescreening built into boostrapped confidence intervals

Description

Run glm with Lasso prescreening built into boostrapped confidence intervals

Usage

cowboy_glm(
  data,
  clusterid = "id",
  Ws,
  forcedW = NULL,
  pair = NULL,
  family = "gaussian",
  B = 200,
  confint.level = 0.95,
  n.cores = 1
)

Arguments

Ws

data frame that includes candidate adjustment covariates to screen

family

GLM model family (gaussian, binomial, poisson, or negative binomial). Use "neg.binom" for Negative binomial.

Y

Outcome variable (continuous, such as LAZ, or binary, such as diarrhea)

pval

The p-value threshold: any variables with a p-value from the lielihood ratio test below this threshold will be returned. Defaults to 0.2

print

Logical for whether to print function output, defaults to TRUE.

Value

Function returns the list of variable names with a likelihood ratio test p-value <0.2 (unless a custom p-value is specified).


ben-arnold/washb documentation built on Dec. 11, 2023, 7:06 p.m.