print_log | R Documentation |
New function ready for revision
print_log(meas, var, adj, data, dec = 2)
meas |
outcome meassure variable name in data-data.frame as a string. Can be numeric or factor. Result is calculated accordingly. |
var |
exposure variable to compare against (active vs placebo). As string. |
adj |
variables to adjust for, as string. |
data |
dataframe of data. |
dec |
decimals for results, standard is set to 2. Mean and sd is dec-1. |
Printable table of logistic regression analysis. Leaves out other variables from results.
##Example with with sample data sz=100 dta<-data.frame(out=factor(sample(c("yes","no"),sz,replace=TRUE)),variable=factor(sample(c("down","up"),sz,replace=TRUE)),sex=factor(sample(c("male","female"),sz,replace=TRUE,prob=c(0.6,0.4))),age=as.numeric(sample(18:80,sz,replace=TRUE))) print_log(meas="out",var="variable",adj=c("sex","age"),data=dta,dec=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.