2021-06-11 12:07:55 +02:00
|
|
|
% 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}
|
2021-06-11 13:43:56 +02:00
|
|
|
\title{Print regression results in table}
|
2021-06-11 12:07:55 +02:00
|
|
|
\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.}
|
|
|
|
|
2021-10-06 09:14:54 +02:00
|
|
|
\item{var}{binary exposure variable to compare against (active vs placebo). As string. Horisontal.}
|
2021-06-11 12:07:55 +02:00
|
|
|
|
2021-10-06 09:14:54 +02:00
|
|
|
\item{group}{binary stratum to compare, as string. Vertical.}
|
2021-06-11 12:07:55 +02:00
|
|
|
|
|
|
|
\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{
|
2021-06-11 13:43:56 +02:00
|
|
|
New function ready for revision / rewrite
|
2021-06-11 12:07:55 +02:00
|
|
|
}
|
|
|
|
\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)
|
2021-06-11 13:43:56 +02:00
|
|
|
print_diff_bygroup(meas="mpg",var="vs",group = "am",adj=c("disp","wt"),data=mtcars)
|
2021-06-11 12:07:55 +02:00
|
|
|
}
|
2021-10-06 09:14:54 +02:00
|
|
|
\keyword{print}
|
|
|
|
\keyword{stratum}
|