This commit is contained in:
agdamsbo 2018-10-04 10:40:10 +02:00
parent 5505baae5a
commit a45e3ff586
2 changed files with 6 additions and 1 deletions

View File

@ -6,8 +6,9 @@
#' @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
#' @export #'
#' @examples #' @examples
#' l<-5 #' l<-5
#' y<-factor(rep(c("a","b"),l)) #' y<-factor(rep(c("a","b"),l))
@ -18,6 +19,9 @@
#' 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
#'
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

View File

@ -30,6 +30,7 @@ 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}