diff --git a/DESCRIPTION b/DESCRIPTION index c21328b..feb3d74 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: daDoctoR Type: Package Title: FUNCTIONS FOR HEALTH RESEARCH -Version: 0.1.0.9010 +Version: 0.1.0.9011 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_pred.R b/R/strobe_pred.R index e9d5a01..f804888 100644 --- a/R/strobe_pred.R +++ b/R/strobe_pred.R @@ -29,6 +29,8 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE){ names(dfcr)<-c("pred","or_ci","pv") n.mn<-c() + nref<-c() + for(i in 1:ncol(ads)){ dat<-data.frame(m=m,ads[,i]) names(dat)<-c("m",names(ads)[i]) @@ -160,7 +162,7 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE){ ref<-data.frame(re[,1],re[,2],re[,5],re[,3]) - names(ref)<-c("Variable","N","Crude OR (95 % CI)","Mutually adjusted OR (95 % CI)") + names(ref)<-c("Variable",paste0("N=",nall),"Crude OR (95 % CI)","Mutually adjusted OR (95 % CI)") ls<-list(tbl=ref,miss,n.meas,nrow(d)) names(ls)<-c("Printable table","Deleted due to missingness in adjusted analysis","Number of outcome observations","Length of dataframe")