daDoctoR/man/rep_lm.Rd
agdamsbo f807350a89 u
2018-10-04 21:06:22 +02:00

36 lines
1.0 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rep_lm.R
\name{rep_lm}
\alias{rep_lm}
\title{A repeated linear regression function}
\usage{
rep_lm(meas, vars, string, ci = FALSE, data)
}
\arguments{
\item{meas}{Effect meassure. Input as c() of columnnames, use dput().}
\item{vars}{variables in model. Input as c() of columnnames, use dput().}
\item{string}{variables to test. Input as c() of columnnames, use dput().}
\item{ci}{flag to get results as OR with 95% confidence interval.}
\item{data}{data frame to pull variables from.}
}
\description{
For bivariate analyses, to determine which variables to include in adjusted model.
}
\examples{
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","v3")
rep_lm(meas="x",vars="y",string=preds,ci=F,data=d)
}
\keyword{linear}
\keyword{regression}