daDoctoR/man/print_pred_stratum.Rd
2021-06-14 10:40:02 +02:00

32 lines
1.2 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print_pred_stratum.R
\name{print_pred_stratum}
\alias{print_pred_stratum}
\title{Extension to the print_pred function, for by stratum analysis.}
\usage{
print_pred_stratum(meas, adj, strat, data, dec, include.stratum = TRUE)
}
\arguments{
\item{meas}{binary outcome measure variable, column name in data.frame as a string. Can be numeric or factor. Result is calculated accordingly.}
\item{adj}{variables to adjust for, as string.}
\item{strat}{stratum to stratify, variable name as string}
\item{data}{dataframe of data.}
\item{include.stratum}{flag to set if stratum variable should be included in first analysis of non-stratified data.}
}
\description{
Outputs list of results from 'print_pred' for the whole data set and for each stratum defined by 'strat'.
Suitable to assist in determining whether a variable is a confounder or effect modifier.
Ref: https://open.oregonstate.education/epidemiology/chapter/effect-modification/
}
\examples{
data('mtcars')
mtcars$vs<-factor(mtcars$vs)
mtcars$am<-factor(mtcars$am)
print_pred_stratum(meas="mpg",strat="vs",adj=c("disp","wt","am"),data=mtcars,include.stratum=TRUE)
}
\keyword{stratum}