mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-21 19:30:22 +01:00
41 lines
1.3 KiB
R
41 lines
1.3 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 = 2,
|
|
n.by.adj = FALSE,
|
|
p.val = FALSE,
|
|
include.stratum = T
|
|
)
|
|
}
|
|
\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}
|