diff --git a/DESCRIPTION b/DESCRIPTION index 9b4eddc..7de6acf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: daDoctoR Type: Package Title: FUNCTIONS FOR HEALTH RESEARCH -Version: 0.1.0.9016 +Version: 0.1.0.9018 Author@R: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut"))) Maintainer: Andreas Gammelgaard Damsbo Description: I am a Danish medical doctor involved in neuropsychiatric research. diff --git a/R/strobe_diff_twodim.R b/R/strobe_diff_twodim.R index afaaece..98ad81e 100644 --- a/R/strobe_diff_twodim.R +++ b/R/strobe_diff_twodim.R @@ -67,16 +67,16 @@ strobe_diff_twodim<-function(meas,group,adj,data,dec=2){ di<-dat mod<-glm(m~g,family=binomial(),data=di) - ci<-confint(mod) - co<-round(coef(mod)[-1],dec) + ci<-exp(confint(mod)) + co<-round(exp(coef(mod))[-1],dec) lo<-round(ci[-1,1],dec) up<-round(ci[-1,2],dec) or_ci<-c("REF",paste0(co," (",lo," to ",up,")")) amod<-glm(m~.,family=binomial(),data=di) - aci<-confint(amod) - aco<-round(coef(amod)[2:length(levels(g))],dec) + aci<-exp(confint(amod)) + aco<-round(exp(coef(amod))[2:length(levels(g))],dec) alo<-round(aci[2:length(levels(g)),1],dec) aup<-round(aci[2:length(levels(g)),2],dec) diff --git a/man/strobe_olr.Rd b/man/strobe_olr.Rd index ecdb649..11a8bec 100644 --- a/man/strobe_olr.Rd +++ b/man/strobe_olr.Rd @@ -4,14 +4,12 @@ \alias{strobe_olr} \title{Print regression results according to STROBE} \usage{ -strobe_olr(meas, var, adj, data, dec = 2) +strobe_olr(meas, vars, data, dec = 2) } \arguments{ \item{meas}{outcome meassure variable name in data-data.frame as a string. Can be numeric or factor. Result is calculated accordingly.} -\item{var}{exposure variable to compare against (active vs placebo). As string.} - -\item{adj}{variables to adjust for, as string.} +\item{vars}{variables to compare against. As vector of columnnames.} \item{data}{dataframe of data.}