View source: R/strobe_diff_bygroup.R
strobe_diff_bygroup | R Documentation |
Print regression results according to STROBE
strobe_diff_bygroup(meas, var, group, adj, data, dec = 2)
meas |
outcome measure variable name in data-data.frame as a string. Can be numeric or factor. Result is calculated accordingly. |
var |
binary exposure variable to compare against (active vs placebo). As string. |
group |
binary group to compare, as string. |
adj |
variables to adjust for, as string. |
data |
dataframe to subset from. |
dec |
decimals for results, standard is set to 2. Mean and sd is dec-1. pval has 3 decimals. |
Printable table of two dimensional regression analysis of group vs variable for outcome measure. By group. Includes p-value Group and variable has to be dichotomous factor.
data('mtcars') mtcars$vs<-factor(mtcars$vs) mtcars$am<-factor(mtcars$am) strobe_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.