print_log: Print regression results in table

View source: R/print_log.R

print_logR Documentation

Print regression results in table

Description

New function ready for revision

Usage

print_log(meas, var, adj, data, dec = 2)

Arguments

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.

Details

Printable table of logistic regression analysis. Leaves out other variables from results.

Examples

  ##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)

agdamsbo/daDoctoR documentation built on Aug. 30, 2022, 4:29 p.m.