fit_lm function

fit linear model based on input data.frame

fit linear model based on input data.frame

fit_lm(y_str, X, verbose = TRUE)

Arguments

  • y_str: a string representation of the column in X that is the outcome
  • X: a data.frame or matrix that contains the predictor and outcome variables
  • verbose: if TRUE (default), a model summary will be printed to the console

Returns

A lm object where the y_str column has been regressed against the remaining columns of X (with an intercept term as well).