\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex
  \usepackage{unicode-math}
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\usepackage{hyperref}
\hypersetup{
            pdftitle={Analysis plan and power calculations for the NutriCare Study},
            pdfauthor={<NAME> and <NAME>},
            pdfborder={0 0 0},
            breaklinks=true}
\urlstyle{same}  % don't use monospace font for urls
\usepackage[margin=1in]{geometry}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\usepackage{framed}
\definecolor{shadecolor}{RGB}{248,248,248}
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.77,0.63,0.00}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{#1}}}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi

% set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother


\title{Analysis plan and power calculations for the NutriCare Study}
\author{<NAME> and <NAME>}
\date{May 15, 2020}

\begin{document}
\maketitle

The purpose of this script is to describe and freeze a version of the
analysis plan associated with the NutriCare Study, which is expected to
open in September of 2020. Analysis is expected in late 2021.

\hypertarget{overview-of-the-nutricare-study}{%
\section{Overview of the NutriCare
Study}\label{overview-of-the-nutricare-study}}

The NutriCare Study will evaluate whether nutritional counseling and
dietary modification affect the health and survival of high-risk
patients undergoing treatment for lung cancer. The study will enroll 150
patients and randomize to a dietary intervention arm (3 home-delivered
medically-tailored meals per day provided for 6 months plus
individualized nutrition counseling provided by Registered Dietitians
for 8 months) versus a passive nutrition education ``enhanced control''
arm.

\hypertarget{hypothesis-1}{%
\section{Hypothesis 1}\label{hypothesis-1}}

\hypertarget{strong-baseline-differences-regional-demographic-will-result-in-the-3-month-samples-clustering-by-non-metric-multidimensional-scaling-more-closely-with-that-individuals-baseline-sample-than-with-the-other-3-month-samples-grouped-by-mtm-category.}{%
\subsection{Strong baseline differences (regional, demographic) will
result in the 3-month samples clustering (by non-metric multidimensional
scaling) more closely with that individual's baseline sample than with
the other 3-month samples grouped by MTM
category.}\label{strong-baseline-differences-regional-demographic-will-result-in-the-3-month-samples-clustering-by-non-metric-multidimensional-scaling-more-closely-with-that-individuals-baseline-sample-than-with-the-other-3-month-samples-grouped-by-mtm-category.}}

\hypertarget{conversely-the-8-month-samples-will-cluster-more-closely-with-other-8-month-samples-by-mtm-category-indicating-the-long-term-dietary-intervention-shifted-the-microbiomes-in-a-consistent-way.}{%
\subsection{Conversely, the 8-month samples will cluster more closely
with other 8-month samples by MTM category, indicating the long-term
dietary intervention shifted the microbiomes in a consistent
way.}\label{conversely-the-8-month-samples-will-cluster-more-closely-with-other-8-month-samples-by-mtm-category-indicating-the-long-term-dietary-intervention-shifted-the-microbiomes-in-a-consistent-way.}}

\hypertarget{methods}{%
\subsubsection{Methods}\label{methods}}

Sample clustering by individual versus by time point will be the
assessed within an NMDS plot. * Distances to the cluster centroid
(normally distributed) will be compared between the NutriCare and
NutriTool 8-month time point clusters. * Distances to cluster centroid
between clusters assigned by individual (all three time-points), versus
by MTM category (3-month (hypothesis 1) and 8-month (hypothesis 2) time
points, separately)).

\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{MESS}\OperatorTok{::}\KeywordTok{power_t_test}\NormalTok{(}\DataTypeTok{delta =} \DecValTok{10}\NormalTok{,}
             \DataTypeTok{sd =} \DecValTok{5}\NormalTok{, }
             \DataTypeTok{power =} \FloatTok{0.8}\NormalTok{, }
             \DataTypeTok{sig.level =} \FloatTok{0.05}\NormalTok{,}
             \DataTypeTok{ratio =} \DecValTok{5}\NormalTok{,}
             \DataTypeTok{sd.ratio =} \DecValTok{5}\NormalTok{,}
             \DataTypeTok{type =} \StringTok{"two.sample"}\NormalTok{,}
             \DataTypeTok{alternative =} \StringTok{"one.sided"}\NormalTok{)}
\end{Highlighting}
\end{Shaded}

\begin{verbatim}
## 
##      Two-sample t test power calculation with unequal sample sizes and unequal variances 
## 
##               n = 9.507852, 47.539259
##           delta = 10
##              sd = 5, 25
##       sig.level = 0.05
##           power = 0.8
##     alternative = one.sided
## 
## NOTE: n is vector of number in each group
\end{verbatim}

A sample size of 10 patients is estimated to have 80\% power to detect a
difference in means of one standard deviation (FITNESS preliminary data
(Figure 2B) mean distance to centroid = 0.27 mds, sd = 0.17,
\[\alpha = 0.05\]. Roughly equal distribution of patients across MTM
categories would have sufficient sample size to test all MTMs.

\hypertarget{hypothesis-2}{%
\section{Hypothesis 2}\label{hypothesis-2}}

\hypertarget{the-nutricare-arm-will-show-a-decrease-in-markers-of-systemic-inflammation-modified-glasgow-prognostic-score-over-time-with-different-effect-sizes-by-mtm-category.}{%
\subsection{The NutriCare arm will show a decrease in markers of
systemic inflammation (modified Glasgow Prognostic Score) over time,
with different effect sizes by MTM
category.}\label{the-nutricare-arm-will-show-a-decrease-in-markers-of-systemic-inflammation-modified-glasgow-prognostic-score-over-time-with-different-effect-sizes-by-mtm-category.}}

\hypertarget{methods-1}{%
\subsubsection{Methods}\label{methods-1}}

\begin{itemize}
\tightlist
\item
  mGPS will be calculated using the levels of plasma CRP and albumin
  (CRP threshold at 10 mg/L, albumin at 35 g/L, ordinal variable range
  0-2).
\item
  the change in mGPS will be assessed (1) from baseline and 3 months,
  and (2) from baseline to 8 months, and compare the changes between the
  intervention and control groups (i.e., change-in-change).
\item
  The comparison between NutriCare and NutriTool (binary) predictor
  variable will be assessed using a paired Mann Whitney Wilcoxon test.
\end{itemize}

\begin{Shaded}
\begin{Highlighting}[]
\CommentTok{# Sample size of the intervention arm (NutriCare)}
\NormalTok{n.int <-}\StringTok{ }\DecValTok{75}
\CommentTok{# Sample size of the control arm (NutriTool)}
\NormalTok{n.con <-}\StringTok{ }\DecValTok{75}

\CommentTok{# Function for simulating distributions as a function of means and sample sizes}
\NormalTok{simfun.wilcox <-}\StringTok{ }\ControlFlowTok{function}\NormalTok{(}\DataTypeTok{n1 =}\NormalTok{ n.int, }\DataTypeTok{n2 =}\NormalTok{ n.con, }\DataTypeTok{mu1 =} \DecValTok{1}\NormalTok{, }\DataTypeTok{mu2 =}\NormalTok{ mu1) \{}
  \CommentTok{# Normally distributed values}
\NormalTok{  x1 <-}\StringTok{ }\KeywordTok{rnorm}\NormalTok{(n1, }\DecValTok{1} \OperatorTok{/}\StringTok{ }\NormalTok{mu1)}
\NormalTok{  x2 <-}\StringTok{ }\KeywordTok{rnorm}\NormalTok{(n2, }\DecValTok{1} \OperatorTok{/}\StringTok{ }\NormalTok{mu2)}
  \KeywordTok{wilcox.test}\NormalTok{(x1, x2)}\OperatorTok{$}\NormalTok{p.value}
\NormalTok{\}}


\KeywordTok{set.seed}\NormalTok{(}\DecValTok{876543}\NormalTok{)}

\CommentTok{# Set effect size to 1.9-fold change, replicate 1000 times }
\NormalTok{out <-}\StringTok{ }\KeywordTok{replicate}\NormalTok{(}\DecValTok{10000}\NormalTok{, }\KeywordTok{simfun.wilcox}\NormalTok{(}\DataTypeTok{mu1 =} \DecValTok{1}\NormalTok{, }\DataTypeTok{mu2 =} \FloatTok{1.9}\NormalTok{))}
\KeywordTok{hist}\NormalTok{(out)}
\KeywordTok{abline}\NormalTok{(}\DataTypeTok{v=}\FloatTok{0.05}\NormalTok{,}\DataTypeTok{col=}\StringTok{'red'}\NormalTok{)}
\end{Highlighting}
\end{Shaded}

\includegraphics{power-calc_files/figure-latex/wilcox test-1.pdf}

\begin{Shaded}
\begin{Highlighting}[]
\KeywordTok{mean}\NormalTok{(out }\OperatorTok{<=}\StringTok{ }\FloatTok{0.05}\NormalTok{)}
\end{Highlighting}
\end{Shaded}

\begin{verbatim}
## [1] 0.8011
\end{verbatim}

<NAME> test suggest that 75 patients per arm will give
80\% power to detect a 1.9-fold change in mGPS.

\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{simfun.t <-}\StringTok{ }\ControlFlowTok{function}\NormalTok{(}\DataTypeTok{n1 =}\NormalTok{ n.int, }\DataTypeTok{n2 =}\NormalTok{ n.con, }\DataTypeTok{mu1 =} \DecValTok{1}\NormalTok{, }\DataTypeTok{mu2 =}\NormalTok{ mu1)\{}
\NormalTok{x1 <-}\StringTok{ }\KeywordTok{rnorm}\NormalTok{(n1, }\DecValTok{1}\OperatorTok{/}\NormalTok{mu1)}
\NormalTok{x2 <-}\StringTok{ }\KeywordTok{rnorm}\NormalTok{(n2, }\DecValTok{1}\OperatorTok{/}\NormalTok{mu2)}
\KeywordTok{t.test}\NormalTok{(x1,x2, }\DataTypeTok{alternative =} \StringTok{"g"}\NormalTok{)}\OperatorTok{$}\NormalTok{p.value}
\NormalTok{\}}

\KeywordTok{set.seed}\NormalTok{(}\DecValTok{876543}\NormalTok{)}
\NormalTok{out <-}\StringTok{ }\KeywordTok{replicate}\NormalTok{(}\DecValTok{10000}\NormalTok{, }\KeywordTok{simfun.t}\NormalTok{(}\DataTypeTok{mu1=}\DecValTok{1}\NormalTok{,}\DataTypeTok{mu2=}\FloatTok{1.73}\NormalTok{))}
\KeywordTok{hist}\NormalTok{(out)}
\KeywordTok{abline}\NormalTok{(}\DataTypeTok{v=}\FloatTok{0.05}\NormalTok{,}\DataTypeTok{col=}\StringTok{'red'}\NormalTok{)}
\end{Highlighting}
\end{Shaded}

\includegraphics{power-calc_files/figure-latex/ttest-1.pdf}

\begin{Shaded}
\begin{Highlighting}[]
\KeywordTok{mean}\NormalTok{(out }\OperatorTok{<=}\StringTok{ }\FloatTok{0.05}\NormalTok{)}
\end{Highlighting}
\end{Shaded}

\begin{verbatim}
## [1] 0.8198
\end{verbatim}

If the mGPS scores are Gaussian, a t-test of the same sample size could
detect a 1.73-fold change with 82.5\% power.

\begin{itemize}
\tightlist
\item
  The MTM (categorical) predictor will be assessed using a Friedman test
  (non-parametric repeated-measures ANOVA) with the effect size
  estimated by Kendall's coefficient of concordance, where the NutriTool
  arm will be incorporated as another MTM category and the index of the
  estimate.
\end{itemize}

\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{simfun <-}\StringTok{ }\ControlFlowTok{function}\NormalTok{(}\DataTypeTok{nblocks =} \DecValTok{10}\NormalTok{, }
                   \DataTypeTok{means =} \KeywordTok{c}\NormalTok{(}\DecValTok{1}\NormalTok{, }\DecValTok{1}\NormalTok{), }
                   \DataTypeTok{within.sd =} \DecValTok{1}\NormalTok{, }
                   \DataTypeTok{between.sd =} \DecValTok{1}\NormalTok{) \{}
\NormalTok{  g <-}\StringTok{ }\KeywordTok{factor}\NormalTok{(}\KeywordTok{rep}\NormalTok{(}\KeywordTok{seq_len}\NormalTok{(nblocks), }\DataTypeTok{each=}\KeywordTok{length}\NormalTok{(means)))}
\NormalTok{  t <-}\StringTok{ }\KeywordTok{rep}\NormalTok{(}\KeywordTok{seq_along}\NormalTok{(means), nblocks)}
\NormalTok{  y <-}\StringTok{ }\NormalTok{means[t] }\OperatorTok{+}\StringTok{ }\KeywordTok{rnorm}\NormalTok{(nblocks, }\DecValTok{0}\NormalTok{, between.sd)[g] }\OperatorTok{+}\StringTok{ }
\StringTok{    }\KeywordTok{rnorm}\NormalTok{(}\KeywordTok{length}\NormalTok{(g),}\DecValTok{0}\NormalTok{, within.sd)}
  \KeywordTok{friedman.test}\NormalTok{(y }\OperatorTok{~}\StringTok{ }\NormalTok{t }\OperatorTok{|}\StringTok{ }\NormalTok{g)}\OperatorTok{$}\NormalTok{p.value}
\NormalTok{\}}

\CommentTok{# test size of test}
\KeywordTok{set.seed}\NormalTok{(}\DecValTok{112358}\NormalTok{)}
\NormalTok{out2 <-}\StringTok{ }\KeywordTok{replicate}\NormalTok{(}\DecValTok{1000}\NormalTok{, }\KeywordTok{simfun}\NormalTok{(}\DataTypeTok{nblocks =} \DecValTok{12}\NormalTok{, }\DataTypeTok{means =} \KeywordTok{c}\NormalTok{(}\DecValTok{1}\NormalTok{, }\DecValTok{1}\NormalTok{, }\DecValTok{1}\NormalTok{, }\DecValTok{2}\NormalTok{, }\DecValTok{2}\NormalTok{, }\DecValTok{2}\NormalTok{)}
\NormalTok{                               )}
\NormalTok{                  )}
\KeywordTok{hist}\NormalTok{(out2)}
\end{Highlighting}
\end{Shaded}

\includegraphics{power-calc_files/figure-latex/friedman-1.pdf}

\begin{Shaded}
\begin{Highlighting}[]
\KeywordTok{mean}\NormalTok{(out2 }\OperatorTok{<=}\StringTok{ }\FloatTok{0.05}\NormalTok{)}
\end{Highlighting}
\end{Shaded}

\begin{verbatim}
## [1] 0.818
\end{verbatim}

A Friedman test shows 80\% power to detect a 2-fold change in means
between MTM categories.

\hypertarget{exploratory-analyses}{%
\section{Exploratory analyses}\label{exploratory-analyses}}

\hypertarget{number-of-covariates-that-can-be-simultaneously-estimated-in-linear-models-controlling-variables}{%
\section{Number of covariates that can be simultaneously estimated in
linear models (controlling
variables)}\label{number-of-covariates-that-can-be-simultaneously-estimated-in-linear-models-controlling-variables}}

\begin{Shaded}
\begin{Highlighting}[]
\CommentTok{# 3.3.5.2}
\CommentTok{###### Power to simultaneously estimate covariates ###########}

\NormalTok{n =}\StringTok{ }\DecValTok{15}
\NormalTok{sig.level <-}\StringTok{ }\FloatTok{0.05}

\CommentTok{# Degrees of freedom for the tests  (X continuous variables - 1)}
\NormalTok{u <-}\StringTok{ }\KeywordTok{seq}\NormalTok{(}\DecValTok{1}\NormalTok{, }\DecValTok{20}\NormalTok{)}

\CommentTok{# Degrees of freedom of the error (v = n − u − 1)}
\NormalTok{v <-}\StringTok{ }\KeywordTok{c}\NormalTok{()}

\NormalTok{effect.size <-}\StringTok{ }\FloatTok{0.8}

\ControlFlowTok{for}\NormalTok{ (i }\ControlFlowTok{in}\NormalTok{ u) \{}
\NormalTok{  v[i] <-}\StringTok{ }\KeywordTok{pwr.f2.test}\NormalTok{(}\DataTypeTok{u =}\NormalTok{ i, }\DataTypeTok{f2 =}\NormalTok{ effect.size, }\DataTypeTok{sig.level =}\NormalTok{ sig.level, }\DataTypeTok{power =} \FloatTok{0.8}\NormalTok{)}\OperatorTok{$}\NormalTok{v}
\NormalTok{\}}

\NormalTok{n <-}\StringTok{ }\NormalTok{v }\OperatorTok{+}\StringTok{ }\NormalTok{u }\OperatorTok{+}\StringTok{ }\DecValTok{1}

\NormalTok{df <-}\StringTok{ }\KeywordTok{data.frame}\NormalTok{(}\DataTypeTok{u =}\NormalTok{ u,}
                 \DataTypeTok{v =}\NormalTok{ v,}
                 \DataTypeTok{n =}\NormalTok{ n)}
\NormalTok{df }\OperatorTok{%>%}
\StringTok{  }\KeywordTok{filter}\NormalTok{(n }\OperatorTok{<}\StringTok{ }\DecValTok{70} \OperatorTok{&}\StringTok{ }\NormalTok{n }\OperatorTok{>}\StringTok{ }\DecValTok{5}\NormalTok{) }\OperatorTok{%>%}
\StringTok{  }\KeywordTok{ggplot}\NormalTok{(}\KeywordTok{aes}\NormalTok{(n, u)) }\OperatorTok{+}
\StringTok{  }\KeywordTok{geom_line}\NormalTok{(}\DataTypeTok{lwd =} \DecValTok{1}\NormalTok{) }\OperatorTok{+}
\StringTok{  }\KeywordTok{theme_bw}\NormalTok{() }\OperatorTok{+}
\StringTok{  }\KeywordTok{labs}\NormalTok{(}\DataTypeTok{x =} \StringTok{"Sample size"}\NormalTok{,}
       \DataTypeTok{y =} \StringTok{"Number of Covariates"}\NormalTok{) }\OperatorTok{+}
\StringTok{  }\KeywordTok{annotate}\NormalTok{(}\StringTok{"text"}\NormalTok{, }\DataTypeTok{x =} \DecValTok{25}\NormalTok{, }\DataTypeTok{y =} \DecValTok{13}\NormalTok{, }
           \DataTypeTok{label =} \StringTok{"Power = 80%"}\NormalTok{, }\DataTypeTok{size =} \DecValTok{3}\NormalTok{, }\DataTypeTok{hjust =} \DecValTok{0}\NormalTok{) }\OperatorTok{+}
\StringTok{  }\KeywordTok{annotate}\NormalTok{(}\StringTok{"text"}\NormalTok{, }\DataTypeTok{x =} \DecValTok{25}\NormalTok{, }\DataTypeTok{y =} \DecValTok{12}\NormalTok{,}
           \DataTypeTok{label =} \StringTok{"alpha = 0.05"}\NormalTok{, }\DataTypeTok{size =} \DecValTok{3}\NormalTok{, }\DataTypeTok{hjust =} \DecValTok{0}\NormalTok{) }\OperatorTok{+}
\StringTok{  }\KeywordTok{annotate}\NormalTok{(}\StringTok{"text"}\NormalTok{, }\DataTypeTok{x =} \DecValTok{25}\NormalTok{, }\DataTypeTok{y =} \DecValTok{11}\NormalTok{, }
           \DataTypeTok{label =} \StringTok{"Effect size = 0.35"}\NormalTok{, }\DataTypeTok{size =} \DecValTok{3}\NormalTok{, }\DataTypeTok{hjust =} \DecValTok{0}\NormalTok{)}
\end{Highlighting}
\end{Shaded}

\includegraphics{power-calc_files/figure-latex/unnamed-chunk-2-1.pdf}

\hypertarget{repoducibility}{%
\subsection{Repoducibility}\label{repoducibility}}

\begin{Shaded}
\begin{Highlighting}[]
\CommentTok{# Date and time}
\KeywordTok{Sys.time}\NormalTok{()}
\end{Highlighting}
\end{Shaded}

\begin{verbatim}
## [1] "2020-06-17 23:28:05 EDT"
\end{verbatim}

\begin{Shaded}
\begin{Highlighting}[]
\CommentTok{# Repository}
\NormalTok{git2r}\OperatorTok{::}\KeywordTok{repository}\NormalTok{()}
\end{Highlighting}
\end{Shaded}

\begin{verbatim}
## Local:    master /users/PCON0005/cond0107/github/nutricare
## Remote:   master @ origin (https://github.com/spakowiczlab/nutricare)
## Head:     [fe55f01] 2020-06-18: Update power-calc.Rmd
\end{verbatim}

\begin{Shaded}
\begin{Highlighting}[]
\CommentTok{# Session info}
\KeywordTok{sessionInfo}\NormalTok{()}
\end{Highlighting}
\end{Shaded}

\begin{verbatim}
## R version 3.6.3 (2020-02-29)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Red Hat Enterprise Linux
## 
## Matrix products: default
## BLAS/LAPACK: /opt/intel/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_gf_lp64.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] pwr_1.3-0       MESS_0.5.6      wmwpow_0.1.2    forcats_0.5.0  
##  [5] stringr_1.4.0   dplyr_0.8.5     purrr_0.3.4     readr_1.3.1    
##  [9] tidyr_1.0.2     tibble_3.0.1    ggplot2_3.3.0   tidyverse_1.3.0
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.4.6       lubridate_1.7.8    lattice_0.20-38    assertthat_0.2.1  
##  [5] digest_0.6.25      ggforce_0.3.1      R6_2.4.1           cellranger_1.1.0  
##  [9] backports_1.1.6    reprex_0.3.0       ggstance_0.3.4     evaluate_0.14     
## [13] httr_1.4.1         pillar_1.4.3       geepack_1.3-1      rlang_0.4.5       
## [17] lazyeval_0.2.2     readxl_1.3.1       rstudioapi_0.11    Matrix_1.2-18     
## [21] rmarkdown_2.1      labeling_0.3       polyclip_1.10-0    munsell_0.5.0     
## [25] geeM_0.10.1        broom_0.5.6        compiler_3.6.3     modelr_0.1.6      
## [29] xfun_0.13          pkgconfig_2.0.3    htmltools_0.4.0    tidyselect_1.0.0  
## [33] mosaicCore_0.6.0   lamW_1.3.2         fansi_0.4.1        crayon_1.3.4      
## [37] dbplyr_1.4.3       withr_2.2.0        MASS_7.3-51.5      grid_3.6.3        
## [41] nlme_3.1-144       jsonlite_1.6.1     gtable_0.3.0       lifecycle_0.2.0   
## [45] DBI_1.1.0          ggformula_0.9.4    git2r_0.26.1       magrittr_1.5      
## [49] scales_1.1.0       RcppParallel_5.0.1 cli_2.0.2          stringi_1.4.6     
## [53] farver_2.0.3       fs_1.4.1           smoothmest_0.1-2   xml2_1.3.2        
## [57] ellipsis_0.3.0     generics_0.0.2     vctrs_0.2.4        tools_3.6.3       
## [61] glue_1.4.0         tweenr_1.0.1       hms_0.5.3          yaml_2.2.1        
## [65] colorspace_1.4-1   rvest_0.3.5        knitr_1.28         haven_2.2.0
\end{verbatim}

\end{document}
