mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-21 19:30:22 +01:00
u
This commit is contained in:
parent
dc2d8985c1
commit
aac24d7a5d
@ -1,7 +1,7 @@
|
|||||||
Package: daDoctoR
|
Package: daDoctoR
|
||||||
Type: Package
|
Type: Package
|
||||||
Title: FUNCTIONS FOR HEALTH RESEARCH
|
Title: FUNCTIONS FOR HEALTH RESEARCH
|
||||||
Version: 0.1.0.9026
|
Version: 0.1.0.9027
|
||||||
Author: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut")))
|
Author: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut")))
|
||||||
Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
|
Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
|
||||||
Description: I am a Danish medical doctor involved in neuropsychiatric research.
|
Description: I am a Danish medical doctor involved in neuropsychiatric research.
|
||||||
|
@ -138,12 +138,12 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
|
|||||||
|
|
||||||
rnames<-c()
|
rnames<-c()
|
||||||
|
|
||||||
for (i in 1:ncol(dat2)){
|
for (i in 1:length(ads)){
|
||||||
if (is.factor(dat2[,i])){
|
if (is.factor(ads[,i])){
|
||||||
rnames<-c(rnames,names(dat2)[i],levels(dat2[,i]))
|
rnames<-c(rnames,names(ads[i]),levels(ads[,i]))
|
||||||
}
|
}
|
||||||
if (!is.factor(dat2[,i])){
|
if (!is.factor(ads[,i])){
|
||||||
rnames<-c(rnames,names(dat2[i]),"Per unit increase")
|
rnames<-c(rnames,names(ads[i]),"Per unit increase")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res<-cbind(aor_ci,apv)
|
res<-cbind(aor_ci,apv)
|
||||||
@ -180,11 +180,6 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
|
|||||||
|
|
||||||
if(!is.factor(m)){
|
if(!is.factor(m)){
|
||||||
|
|
||||||
d<-dta
|
|
||||||
m<-d[,c(meas)]
|
|
||||||
|
|
||||||
ads<-d[,c(adj)]
|
|
||||||
|
|
||||||
dfcr<-data.frame(matrix(NA,ncol = 3))
|
dfcr<-data.frame(matrix(NA,ncol = 3))
|
||||||
names(dfcr)<-c("pred","dif_ci","pv")
|
names(dfcr)<-c("pred","dif_ci","pv")
|
||||||
n.mn<-c()
|
n.mn<-c()
|
||||||
@ -302,12 +297,12 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
|
|||||||
|
|
||||||
rnames<-c()
|
rnames<-c()
|
||||||
|
|
||||||
for (i in 1:ncol(dat2)){
|
for (i in 1:length(ads)){
|
||||||
if (is.factor(dat2[,i])){
|
if (is.factor(ads[,i])){
|
||||||
rnames<-c(rnames,names(dat2)[i],levels(dat2[,i]))
|
rnames<-c(rnames,names(ads[i]),levels(ads[,i]))
|
||||||
}
|
}
|
||||||
if (!is.factor(dat2[,i])){
|
if (!is.factor(ads[,i])){
|
||||||
rnames<-c(rnames,names(dat2[i]),"Per unit increase")
|
rnames<-c(rnames,names(ads[i]),"Per unit increase")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res<-cbind(amean_ci,apv)
|
res<-cbind(amean_ci,apv)
|
||||||
|
Loading…
Reference in New Issue
Block a user