daDoctoR/man/print_diff_bygroup.Rd
2021-10-06 09:14:54 +02:00

37 lines
1.2 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_diff_bygroup.R
\name{print_diff_bygroup}
\alias{print_diff_bygroup}
\title{Print regression results in table}
\usage{
print_diff_bygroup(meas, var, group, adj, data, dec = 2)
}
\arguments{
\item{meas}{outcome measure variable name in data-data.frame as a string. Can be numeric or factor. Result is calculated accordingly.}
\item{var}{binary exposure variable to compare against (active vs placebo). As string. Horisontal.}
\item{group}{binary stratum to compare, as string. Vertical.}
\item{adj}{variables to adjust for, as string.}
\item{data}{dataframe to subset from.}
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1. pval has 3 decimals.}
}
\description{
New function ready for revision / rewrite
}
\details{
Printable table of two dimensional regression analysis of group vs variable for outcome measure. By group. Includes p-value
Group and variable has to be dichotomous factor.
}
\examples{
data('mtcars')
mtcars$vs<-factor(mtcars$vs)
mtcars$am<-factor(mtcars$am)
print_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
}
\keyword{print}
\keyword{stratum}