mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-24 20:51:54 +01:00
adding exp() to OR´s -> major fix!!
This commit is contained in:
parent
fc2dea7f18
commit
a4b8315380
@ -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 <agdamsbo@pm.me>
|
||||
Description: I am a Danish medical doctor involved in neuropsychiatric research.
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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.}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user