2018-10-02 21:07:43 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rep_glm.R
\name{rep_glm}
\alias{rep_glm}
\title{A repeated logistic regression function}
\usage{
2018-10-04 10:10:35 +02:00
rep_glm(meas, vars, string, ci = FALSE, data)
2018-10-02 21:07:43 +02:00
}
\arguments{
2018-10-04 10:10:35 +02:00
\item{meas}{Effect meassure. Input as c() of columnnames, use dput().}
2018-10-02 21:07:43 +02:00
2018-10-04 09:23:14 +02:00
\item{vars}{variables in model. Input as c() of columnnames, use dput().}
2018-10-04 10:10:35 +02:00
\item{ci}{flag to get results as OR with 95% confidence interval.}
2018-10-04 21:06:22 +02:00
\item{str}{variables to test. Input as c() of columnnames, use dput().}
\item{dta}{data frame to pull variables from.}
2018-10-02 21:07:43 +02:00
}
\description{
2018-10-04 09:23:14 +02:00
For bivariate analyses. The confint() function is rather slow, causing the whole function to hang when including many predictors and calculating the ORs with CI.
2018-10-02 21:07:43 +02:00
}
\examples{
2018-10-04 21:06:22 +02:00
l<-50
y<-factor(rep(c("a","b"),l))
x<-rnorm(length(y), mean=50, sd=10)
v1<-factor(rep(c("r","s"),length(y)/2))
v2<-sample(1:100, length(y), replace=FALSE)
v3<-as.numeric(1:length(y))
d<-data.frame(y,x,v1,v2,v3)
preds<-c("v1","v2","x")
rep_glm(meas="y",vars="v3",string=preds,ci=F,data=d)
2018-10-02 21:07:43 +02:00
}
\keyword{logistic}