2021-06-14 10:40:02 +02:00
|
|
|
% 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{
|
2021-10-06 11:05:55 +02:00
|
|
|
print_pred_stratum(
|
|
|
|
meas,
|
|
|
|
adj,
|
|
|
|
strat,
|
|
|
|
data,
|
|
|
|
dec = 2,
|
|
|
|
n.by.adj = FALSE,
|
2021-10-06 11:14:43 +02:00
|
|
|
p.val = FALSE,
|
|
|
|
include.stratum = T
|
2021-10-06 11:05:55 +02:00
|
|
|
)
|
2021-06-14 10:40:02 +02:00
|
|
|
}
|
|
|
|
\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}
|