library(lme4)
library(influence.ME)
library(sjPlot)
##opts_chunk$set(dev = 'pdf')
opts_chunk$set(cache.path = 'cache/',
               width    = 200,
               fig.height = 8,
               fig.width  = 8,
               warning = FALSE,
               message = FALSE)
options(digits = 3)
## Ensure anchors are assessed first
## opts_knit$set(eval.after = 'echo')
## Hooks
## knit_hooks$set(anchor = hook_anchor)
## Set a seed
set.seed(69027181)
## Set sensible defaults
ggplot2.opts <- list()
ggplot2.opts$binwidth <- 30
## sjPlot defaults
## sjPlot::theme_sjplot(base.theme = theme_bw())
## Exclusions
##
## The following 'non-recruited' need excluding from all analyses
## exclusions <- c()

## Set the study name and procotol versions
study <- list()
study$name               <- 'XXX'
study$protocol_version   <- 'vX YYYY-MM-DD'
study$randomisation_unit <- 'individuals'
## Make a backup of current output based on time stamp by obtaining the
## modified time of the existing file and constructing a command to
## copy this to the sub-directory 'arch/' modifying the filename to include
## the timestamp.  This is done on a daily basis (otherwise './arch/'
## directory can become very large!)
##
## Get the current date
mtime <- file.info('sap.docx')$mtime %>% as.Date()
## Remove existing archives  from today
cmd <- paste0('rm arch/sap-', mtime, '.docx.bz2')
system(cmd)
## Copy the existing .docx to arch, adding todays date and compress
cmd <- paste0('cp sap.docx arch/sap-', mtime, '.docx && bzip2 arch/sap-', mtime, '.docx')
system(cmd)
## Get the current date
mtime <- file.info('sap.html')$mtime %>% as.Date()
## Remove existing archives  from today
cmd <- paste0('rm arch/sap-', mtime, '.html.bz2')
system(cmd)
## Copy the existing .html to arch, adding todays date and compress
cmd <- paste0('cp sap.html arch/sap-', mtime, '.html && bzip2 arch/sap-', mtime, '.html')
system(cmd)

ToDO Create a frontispiece.

NB A large portion of text in this document is lifted directly from the Study Protocol (v2) which should be read in conjunction with this document.


Summary


Introduction, study design and key objectives


Outcome Measures


Sample Size


Randomisation and Blinding


Interim Analyses and Data Monitoring Committees


Data Sources, data evaluability and analysis populations


Outline of Analyses


Detailed statistical methods and calculations


Data manipulation and definitions


Implementation


Appendix


References



ns-ctru/ctru documentation built on May 23, 2019, 9:34 p.m.