mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-22 11:50:23 +01:00
u
This commit is contained in:
parent
89562e92b9
commit
76dd8a4ce7
@ -5,7 +5,6 @@
|
|||||||
#' @param v1 Main variable in model
|
#' @param v1 Main variable in model
|
||||||
#' @param string String of columnnames from dataframe to include. Use dput().
|
#' @param string String of columnnames from dataframe to include. Use dput().
|
||||||
#' @keywords change-in-estimate
|
#' @keywords change-in-estimate
|
||||||
#'
|
|
||||||
#' @examples
|
#' @examples
|
||||||
#' l<-5
|
#' l<-5
|
||||||
#' y<-factor(rep(c("a","b"),l))
|
#' y<-factor(rep(c("a","b"),l))
|
||||||
@ -16,9 +15,7 @@
|
|||||||
#' d<-data.frame(y,x,v1,v2,v3)
|
#' d<-data.frame(y,x,v1,v2,v3)
|
||||||
#' preds<-dput(names(d)[3:ncol(d)])
|
#' preds<-dput(names(d)[3:ncol(d)])
|
||||||
#' cie_test(meas="y",vars="x",string=preds,data=d,logistic = TRUE,cut = 0.1)
|
#' cie_test(meas="y",vars="x",string=preds,data=d,logistic = TRUE,cut = 0.1)
|
||||||
#'
|
|
||||||
#' @export
|
#' @export
|
||||||
#'
|
|
||||||
|
|
||||||
cie_test<-function(meas,vars,string,data,logistic=FALSE,cut=0.1){
|
cie_test<-function(meas,vars,string,data,logistic=FALSE,cut=0.1){
|
||||||
|
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
#' @param string variables to test. Input as c() of columnnames, use dput().
|
#' @param string variables to test. Input as c() of columnnames, use dput().
|
||||||
#' @param ci flag to get results as OR with 95% confidence interval.
|
#' @param ci flag to get results as OR with 95% confidence interval.
|
||||||
#' @param data data frame to pull variables from.
|
#' @param data data frame to pull variables from.
|
||||||
#'
|
|
||||||
#' @keywords logistic regression
|
#' @keywords logistic regression
|
||||||
#'
|
|
||||||
#' @examples
|
#' @examples
|
||||||
#' l<-5
|
#' l<-5
|
||||||
#' y<-factor(rep(c("a","b"),l))
|
#' y<-factor(rep(c("a","b"),l))
|
||||||
@ -19,9 +17,7 @@
|
|||||||
#' d<-data.frame(y,x,v1,v2,v3)
|
#' d<-data.frame(y,x,v1,v2,v3)
|
||||||
#' preds<-dput(names(d)[3:ncol(d)])
|
#' preds<-dput(names(d)[3:ncol(d)])
|
||||||
#' rep_glm(meas="y",vars="x",string=preds,ci=FALSE,data=df)
|
#' rep_glm(meas="y",vars="x",string=preds,ci=FALSE,data=df)
|
||||||
#'
|
|
||||||
#' @export
|
#' @export
|
||||||
#'
|
|
||||||
|
|
||||||
rep_glm<-function(meas,vars,string,ci=FALSE,data){
|
rep_glm<-function(meas,vars,string,ci=FALSE,data){
|
||||||
## x is data.frame of predictors, y is vector of an aoutcome as a factor
|
## x is data.frame of predictors, y is vector of an aoutcome as a factor
|
||||||
|
@ -26,6 +26,5 @@ v3<-as.numeric(1:length(y))
|
|||||||
d<-data.frame(y,x,v1,v2,v3)
|
d<-data.frame(y,x,v1,v2,v3)
|
||||||
preds<-dput(names(d)[3:ncol(d)])
|
preds<-dput(names(d)[3:ncol(d)])
|
||||||
cie_test(meas="y",vars="x",string=preds,data=d,logistic = TRUE,cut = 0.1)
|
cie_test(meas="y",vars="x",string=preds,data=d,logistic = TRUE,cut = 0.1)
|
||||||
|
|
||||||
}
|
}
|
||||||
\keyword{change-in-estimate}
|
\keyword{change-in-estimate}
|
||||||
|
@ -30,7 +30,6 @@ v3<-as.numeric(1:length(y))
|
|||||||
d<-data.frame(y,x,v1,v2,v3)
|
d<-data.frame(y,x,v1,v2,v3)
|
||||||
preds<-dput(names(d)[3:ncol(d)])
|
preds<-dput(names(d)[3:ncol(d)])
|
||||||
rep_glm(meas="y",vars="x",string=preds,ci=FALSE,data=df)
|
rep_glm(meas="y",vars="x",string=preds,ci=FALSE,data=df)
|
||||||
|
|
||||||
}
|
}
|
||||||
\keyword{logistic}
|
\keyword{logistic}
|
||||||
\keyword{regression}
|
\keyword{regression}
|
||||||
|
Loading…
Reference in New Issue
Block a user