mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-23 12:20:22 +01:00
33 lines
1.1 KiB
R
33 lines
1.1 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/print_log.R
|
|
\name{print_log}
|
|
\alias{print_log}
|
|
\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{
|
|
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}
|