This function accepts a main_effect and a set of covariates (using the R formula notation) and performs a linear regression including main_effect + covariates.

bstr_lm(main_effect = "", covariates = "", bstr_data, mult_comp = "fdr")

Arguments

main_effect

Character string containing an independent variable whose effect you want to measure. It could be disease status, age, gender etc. This should strictly be a single variable. This can be either a categorical or a continuous variable.

covariates

Character string containing a set of other predictors (variables) in the model. If more than one covariates are included, they should be separated by a + operator similar to an R formula.

bstr_data

Object of type BstrData()

mult_comp

method for multiple comparisons correction. The default method is "fdr". See bstr_p_adjust() for valid values.

Details

Slightly different from the standard R lm function, bstr_lm currently does not directly accept an R formula. This could be accomodated in the future versions. Also currently, this function returns the p-values and the t-statistics for the main_effect only. Returning the statistics for all variables could be accomodated in the future versions.