daDoctoR/man/print_log.Rd

33 lines
1.1 KiB
Plaintext
Raw Normal View History

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_log.R
\name{print_log}
\alias{print_log}
2021-06-11 13:43:56 +02:00
\title{Print regression results in table}
\usage{
print_log(meas, var, adj, data, dec = 2)
}
\arguments{
\item{meas}{outcome meassure variable name in data-data.frame as a string. Can be numeric or factor. Result is calculated accordingly.}
\item{var}{exposure variable to compare against (active vs placebo). As string.}
\item{adj}{variables to adjust for, as string.}
\item{data}{dataframe of data.}
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1.}
}
\description{
2021-06-11 13:43:56 +02:00
New function ready for revision
}
\details{
Printable table of logistic regression analysis. Leaves out other variables from results.
}
\examples{
##Example with with sample data
sz=100
dta<-data.frame(out=factor(sample(c("yes","no"),sz,replace=TRUE)),variable=factor(sample(c("down","up"),sz,replace=TRUE)),sex=factor(sample(c("male","female"),sz,replace=TRUE,prob=c(0.6,0.4))),age=as.numeric(sample(18:80,sz,replace=TRUE)))
print_log(meas="out",var="variable",adj=c("sex","age"),data=dta,dec=2)
}
\keyword{logistic}