├── .github ├── .gitignore └── workflows │ └── quarto-publish.yml ├── .gitignore ├── CNAME ├── DESCRIPTION ├── LICENSE ├── README.md ├── _common.R ├── _quarto.yml ├── _utils.R ├── assets ├── cover.png ├── cover.xcf ├── favicon.png └── preview.jpg ├── contributors.csv ├── custom.scss ├── data-adam ├── adae.sas7bdat ├── adlbc.sas7bdat ├── adlbh.sas7bdat ├── adlbhy.sas7bdat ├── adqsadas.sas7bdat ├── adqscibc.sas7bdat ├── adqsnpix.sas7bdat ├── adsl.sas7bdat ├── adtte.sas7bdat └── advs.sas7bdat ├── events.tsv ├── fonts ├── InventionVF_Italics_W_Wght.woff2 └── InventionVF_W_Wght.woff2 ├── images ├── cleanslate-addin.png ├── pack.Rmd ├── pack.png ├── pack.svg ├── preview-txt.png ├── rtf-after-update.png └── rtf-alt-f9.png ├── index.qmd ├── preface.qmd ├── project-folder.qmd ├── project-management.qmd ├── project-overview.qmd ├── r4csr.Rproj ├── references.bib ├── references.qmd ├── renv.lock ├── slides ├── china-r.Rmd ├── china-r.html ├── fda-workshop-slides.Rmd ├── fda-workshop-slides.html ├── function-summary.png ├── minimal.pdf ├── minimal.rtf ├── r2rtf-function-summary.R ├── r2rtf-functions.csv ├── r4csr-gwu.Rmd ├── r4csr-gwu.html ├── r4csr-psi.Rmd ├── r4csr-psi.html ├── r4csr-rstudio.Rmd ├── r4csr-rstudio.html ├── reference.bib ├── render.R ├── reproducibility.png ├── submission-group-logo.png ├── workshop-slides.Rmd └── workshop-slides.html ├── submission-environment.qmd ├── submission-overview.qmd ├── submission-package.qmd ├── tex ├── after_body.tex ├── before_body.tex ├── preamble.tex ├── spbasic.bst ├── svind.ist └── svmono.cls ├── tlf-ae-specific.qmd ├── tlf-ae-summary.qmd ├── tlf-assemble.qmd ├── tlf-baseline.qmd ├── tlf-disposition.qmd ├── tlf-efficacy-ancova.qmd ├── tlf-efficacy-km.qmd ├── tlf-overview.qmd ├── tlf-population.qmd ├── tlf ├── fig_km.png ├── intro-ae1.pdf ├── intro-ae1.rtf ├── intro-ae2.pdf ├── intro-ae2.rtf ├── intro-ae3.pdf ├── intro-ae3.rtf ├── intro-ae5.pdf ├── intro-ae5.rtf ├── intro-ae7.pdf ├── intro-ae7.rtf ├── rtf-combine-toggle.docx ├── rtf-combine.pdf ├── rtf-combine.rtf ├── tbl_disp.pdf ├── tbl_disp.rtf ├── tbl_pop.pdf ├── tbl_pop.rtf ├── tlf_ae_summary.pdf ├── tlf_ae_summary.rtf ├── tlf_base.pdf ├── tlf_base.rtf ├── tlf_eff.pdf ├── tlf_eff.rtf ├── tlf_eff1.pdf ├── tlf_eff1.rtf ├── tlf_eff2.pdf ├── tlf_eff2.rtf ├── tlf_km.pdf ├── tlf_km.rtf ├── tlf_spec_ae.pdf └── tlf_spec_ae.rtf └── validation-tracker.tsv /.github/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | -------------------------------------------------------------------------------- /.github/workflows/quarto-publish.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - main 5 | 6 | name: Render and Publish 7 | 8 | # Need these permissions to publish to GitHub Pages 9 | permissions: 10 | contents: write 11 | pages: write 12 | 13 | jobs: 14 | build-deploy: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Check out repository 19 | uses: actions/checkout@v4 20 | 21 | - name: Set up Quarto 22 | uses: quarto-dev/quarto-actions/setup@v2 23 | with: 24 | # To install LaTeX to build PDF book 25 | tinytex: true 26 | # uncomment below and fill to pin a version 27 | # version: SPECIFIC-QUARTO-VERSION-HERE 28 | 29 | # Add software dependencies here 30 | - name: Install ttf-mscorefonts-installer 31 | run: | 32 | echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections 33 | sudo apt-get update && sudo apt-get install ttf-mscorefonts-installer 34 | 35 | - name: Install LibreOffice 36 | run: sudo apt-get update && sudo apt-get install libreoffice --no-install-recommends 37 | 38 | - name: Set up R 39 | uses: r-lib/actions/setup-r@v2 40 | with: 41 | r-version: 'release' 42 | 43 | - name: Set up R packages in DESCRIPTION 44 | uses: r-lib/actions/setup-r-dependencies@v2 45 | 46 | # To publish to Netlify, Posit Connect, or GitHub Pages, uncomment 47 | # the appropriate block below 48 | 49 | # - name: Publish to Netlify (and render) 50 | # uses: quarto-dev/quarto-actions/publish@v2 51 | # with: 52 | # target: netlify 53 | # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} 54 | 55 | # - name: Publish to Posit Connect (and render) 56 | # uses: quarto-dev/quarto-actions/publish@v2 57 | # with: 58 | # target: connect 59 | # CONNECT_SERVER: enter-the-server-url-here 60 | # CONNECT_API_KEY: ${{ secrets.CONNECT_API_KEY }} 61 | 62 | # NOTE: If Publishing to GitHub Pages, set the permissions correctly (see top of this yaml) 63 | - name: Publish to GitHub Pages (and render) 64 | uses: quarto-dev/quarto-actions/publish@v2 65 | with: 66 | target: gh-pages 67 | env: 68 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This secret is always available for GitHub Actions 69 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | 6 | /.quarto/ 7 | /_book/ 8 | /site_libs/ 9 | 10 | r4csr.tex 11 | index.adx 12 | index.thm 13 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | r4csr.org -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: r4csr 2 | Type: Book 3 | Title: R for Clinical Study Reports and Submission 4 | Version: 0.1.0 5 | Authors@R: c( 6 | person("Yilong", "Zhang", email = "elong0527@gmail.com", role = c("aut", "cre")), 7 | person("Nan", "Xiao", role = "aut"), 8 | person("Keaven", "Anderson", role = c("aut")), 9 | person("Yalin", "Zhu", role = "aut") 10 | ) 11 | URL: https://r4csr.org/, https://github.com/elong0527/r4csr 12 | Encoding: UTF-8 13 | Imports: 14 | downlit, 15 | emmeans, 16 | haven, 17 | kableExtra, 18 | knitr, 19 | officer, 20 | pkglite, 21 | quarto, 22 | r2rtf, 23 | table1, 24 | tidyverse, 25 | xml2 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # R for Clinical Study Reports and Submission 2 | 3 | The book is available at . 4 | 5 | This project is a work in progress, enriched by the community's collective efforts. 6 | As you read this book, consider joining us as a contributor. 7 | The quality of this resource relies heavily on your input and expertise. 8 | We value your participation and contribution. 9 | 10 | - Authors: contributed the majority of content to at least one chapter. 11 | - Contributors: contributed at least one commit to the source code. 12 | - [List of authors and contributors](https://r4csr.org/preface.html#authors-and-contributors) 13 | 14 | ## Installing dependencies 15 | 16 | To build the book, first install Quarto. 17 | 18 | Then, install the R packages used by the book with: 19 | 20 | ```r 21 | # install.packages("remotes") 22 | remotes::install_deps() 23 | ``` 24 | 25 | ## Build the book 26 | 27 | In RStudio IDE, press Cmd/Ctrl + Shift + B. Or run: 28 | 29 | ```r 30 | quarto::quarto_render() 31 | ``` 32 | -------------------------------------------------------------------------------- /_common.R: -------------------------------------------------------------------------------- 1 | knitr::opts_chunk$set( 2 | comment = "#>", 3 | collapse = TRUE, 4 | message = FALSE 5 | ) 6 | 7 | options(dplyr.summarise.inform = FALSE) 8 | 9 | rtf2pdf <- function(input) { 10 | input <- normalizePath(input) 11 | x <- "export LD_LIBRARY_PATH=:/usr/lib/libreoffice/program:/usr/lib/x86_64-linux-gnu/" 12 | y <- paste0("libreoffice --invisible --headless --nologo --convert-to pdf --outdir tlf/ ", input) 13 | z <- paste(x, y, sep = " && ") 14 | if (Sys.getenv("GITHUB_ACTIONS") != "") system(z) else invisible(NULL) 15 | } 16 | 17 | # Customize data frame and tibble printing methods. 18 | # See for details. 19 | more_rows <- function(x, n) if (nrow(x) <= n) NULL else paste0("# ℹ ", nrow(x) - n, " more rows") 20 | knit_print.data.frame <- function(x, ...) { 21 | paste( 22 | c( 23 | capture.output(base::print.data.frame(head(x, 4))), 24 | more_rows(x, 4) 25 | ), 26 | collapse = "\n" 27 | ) 28 | } 29 | 30 | registerS3method( 31 | "knit_print", "data.frame", knit_print.data.frame, 32 | envir = asNamespace("knitr") 33 | ) 34 | 35 | options(pillar.advice = FALSE) 36 | 37 | knit_print.tbl_df <- function(x, ...) { 38 | paste(capture.output(print(x, n = 4)), collapse = "\n") 39 | } 40 | 41 | registerS3method( 42 | "knit_print", "tbl_df", knit_print.tbl_df, 43 | envir = asNamespace("knitr") 44 | ) 45 | -------------------------------------------------------------------------------- /_quarto.yml: -------------------------------------------------------------------------------- 1 | project: 2 | type: book 3 | resources: 4 | - CNAME 5 | - tlf/ 6 | - slides/ 7 | 8 | book: 9 | title: "R for Clinical Study Reports and Submission" 10 | author: 11 | - Yilong Zhang 12 | - Nan Xiao 13 | - Keaven Anderson 14 | - Yalin Zhu 15 | description: | 16 | Learn how to prepare tables, listings, and figures for 17 | clinical study report and submit to regulatory agencies, 18 | the essential part of clinical trial development. 19 | 20 | output-file: "r4csr" 21 | 22 | cover-image: "assets/cover.png" 23 | image: "assets/preview.jpg" 24 | favicon: "assets/favicon.png" 25 | 26 | site-url: https://r4csr.org/ 27 | repo-url: https://github.com/elong0527/r4csr 28 | repo-actions: [edit, issue, source] 29 | sharing: [twitter, linkedin] 30 | reader-mode: true 31 | 32 | open-graph: 33 | image: assets/preview.jpg 34 | description: | 35 | Learn how to prepare tables, listings, and figures for 36 | clinical study report and submit to regulatory agencies, 37 | the essential part of clinical trial development. 38 | twitter-card: 39 | image: assets/preview.jpg 40 | description: | 41 | Learn how to prepare tables, listings, and figures for 42 | clinical study report and submit to regulatory agencies, 43 | the essential part of clinical trial development. 44 | card-style: summary_large_image 45 | 46 | google-analytics: "G-MKYDL3PNW1" 47 | 48 | chapters: 49 | - index.qmd 50 | - preface.qmd 51 | 52 | - part: "Delivering TLFs in CSR" 53 | chapters: 54 | - tlf-overview.qmd 55 | - tlf-disposition.qmd 56 | - tlf-population.qmd 57 | - tlf-baseline.qmd 58 | - tlf-efficacy-ancova.qmd 59 | - tlf-efficacy-km.qmd 60 | - tlf-ae-summary.qmd 61 | - tlf-ae-specific.qmd 62 | - tlf-assemble.qmd 63 | - part: "Clinical trial project" 64 | chapters: 65 | - project-overview.qmd 66 | - project-folder.qmd 67 | - project-management.qmd 68 | - part: "eCTD submission" 69 | chapters: 70 | - submission-overview.qmd 71 | - submission-package.qmd 72 | - submission-environment.qmd 73 | 74 | - references.qmd 75 | 76 | bibliography: references.bib 77 | 78 | format: 79 | html: 80 | theme: [cosmo, custom.scss] 81 | mainfont: "Invention, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Noto Sans, Liberation Sans, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji" 82 | code-link: true 83 | pdf: 84 | documentclass: tex/svmono 85 | include-in-header: 86 | - "tex/preamble.tex" 87 | include-before-body: 88 | - "tex/before_body.tex" 89 | include-after-body: 90 | - "tex/after_body.tex" 91 | cite-method: natbib 92 | keep-tex: true 93 | toc: true 94 | -------------------------------------------------------------------------------- /_utils.R: -------------------------------------------------------------------------------- 1 | # Utilities that can be ran manually 2 | 3 | # Convert RTF to PDF 4 | r2rtf:::rtf_convert_format( 5 | list.files("tlf", pattern = ".rtf", full.names = TRUE), 6 | output_dir = "tlf" 7 | ) 8 | 9 | #' Flatten copy 10 | #' 11 | #' @param from Source directory path. 12 | #' @param to Destination directory path. 13 | #' 14 | #' @return Destination directory path. 15 | #' 16 | #' @details 17 | #' Copy all `.Rmd`, `.qmd`, and `.md` files from source to destination, 18 | #' rename the `.qmd` and `.md` files with an additional `.Rmd` extension, 19 | #' and get a flat destination structure with path-preserving file names. 20 | flatten_copy <- function(from, to) { 21 | rmd <- list.files(from, pattern = "\\.Rmd$", recursive = TRUE, full.names = TRUE) 22 | xmd <- list.files(from, pattern = "\\.qmd$|\\.md$", recursive = TRUE, full.names = TRUE) 23 | 24 | src <- c(rmd, xmd) 25 | dst <- c(rmd, paste0(xmd, ".Rmd")) 26 | 27 | # Remove starting `./` (if any) 28 | dst <- gsub("^\\./", replacement = "", x = dst) 29 | # Replace the forward slash in path with Unicode big solidus 30 | dst <- gsub("/", replacement = "\u29F8", x = dst) 31 | 32 | file.copy(src, to = file.path(to, dst)) 33 | 34 | invisible(to) 35 | } 36 | 37 | #' Check URLs in an R Markdown or Quarto project 38 | #' 39 | #' @param input Path to the project directory. 40 | #' 41 | #' @return URL checking results from `urlchecker::url_check()` 42 | #' for all `.Rmd`, `.qmd`, and `.md` files in the project. 43 | #' 44 | #' @details 45 | #' The `tools::pkgVignettes()$docs` call in urlchecker requires 46 | #' two core criteria (`VignetteBuilder` and `VignetteEngine`) 47 | #' to recognize `.Rmd` files as package vignettes. 48 | check_url <- function(input = ".") { 49 | # Create a source package directory 50 | pkg <- tempfile() 51 | dir.create(pkg) 52 | 53 | # Flatten copy relevant files 54 | vig <- file.path(pkg, "vignettes") 55 | dir.create(vig) 56 | flatten_copy(input, vig) 57 | 58 | # Create a minimal DESCRIPTION file 59 | write("VignetteBuilder: knitr", file = file.path(pkg, "DESCRIPTION")) 60 | 61 | # Make the copied files look like vignettes 62 | lapply( 63 | list.files(vig, full.names = TRUE), 64 | function(x) { 65 | write( 66 | "---\nvignette: >\n %\\VignetteEngine{knitr::rmarkdown}\n---", 67 | file = x, append = TRUE 68 | ) 69 | } 70 | ) 71 | 72 | urlchecker::url_check(pkg) 73 | } 74 | 75 | check_url() 76 | -------------------------------------------------------------------------------- /assets/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/assets/cover.png -------------------------------------------------------------------------------- /assets/cover.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/assets/cover.xcf -------------------------------------------------------------------------------- /assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/assets/favicon.png -------------------------------------------------------------------------------- /assets/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/assets/preview.jpg -------------------------------------------------------------------------------- /contributors.csv: -------------------------------------------------------------------------------- 1 | name,username 2 | Yujie Zhao,LittleBeannie 3 | Aiming Yang, 4 | Steven Haesendonckx,SHAESEN2 5 | Howard Baek,howardbaek 6 | Xiaoxia Han,echohan 7 | Jie Wang, ifendo 8 | -------------------------------------------------------------------------------- /custom.scss: -------------------------------------------------------------------------------- 1 | /*-- scss:defaults --*/ 2 | 3 | $primary: #00857C !default; 4 | 5 | /*-- scss:rules --*/ 6 | 7 | @font-face { 8 | font-display: swap; 9 | font-family: "Invention"; 10 | src: url("fonts/InventionVF_W_Wght.woff2") format("woff2"); 11 | font-weight: 300 700; 12 | font-style: normal; 13 | } 14 | 15 | @font-face { 16 | font-display: swap; 17 | font-family: "Invention"; 18 | src: url("fonts/InventionVF_Italics_W_Wght.woff2") format("woff2"); 19 | font-weight: 300 700; 20 | font-style: italic; 21 | } 22 | 23 | img.quarto-cover-image { 24 | box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15); 25 | } 26 | 27 | body { 28 | -webkit-font-smoothing: auto; 29 | } -------------------------------------------------------------------------------- /data-adam/adae.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adae.sas7bdat -------------------------------------------------------------------------------- /data-adam/adlbc.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adlbc.sas7bdat -------------------------------------------------------------------------------- /data-adam/adlbh.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adlbh.sas7bdat -------------------------------------------------------------------------------- /data-adam/adlbhy.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adlbhy.sas7bdat -------------------------------------------------------------------------------- /data-adam/adqsadas.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adqsadas.sas7bdat -------------------------------------------------------------------------------- /data-adam/adqscibc.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adqscibc.sas7bdat -------------------------------------------------------------------------------- /data-adam/adqsnpix.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adqsnpix.sas7bdat -------------------------------------------------------------------------------- /data-adam/adsl.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adsl.sas7bdat -------------------------------------------------------------------------------- /data-adam/adtte.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/adtte.sas7bdat -------------------------------------------------------------------------------- /data-adam/advs.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/data-adam/advs.sas7bdat -------------------------------------------------------------------------------- /events.tsv: -------------------------------------------------------------------------------- 1 | Venue Type Date Materials 2 | R/Pharma Conference Workshop 2021-10-28 [Slides](https://r4csr.org/slides/workshop-slides.html) 3 | China-R Conference Talk 2021-11-20 [Slides](https://r4csr.org/slides/china-r.html) 4 | ASA Princeton-Trenton Chapter Short course 2021-12-02 [Slides](https://r4csr.org/slides/workshop-slides.html) 5 | GWU Biostatistics Center Talk 2022-01-21 [Slides](https://r4csr.org/slides/r4csr-gwu.html) 6 | RStudio Pharma Meetup Series Talk 2022-05-17 [Slides](https://r4csr.org/slides/r4csr-rstudio.html) 7 | ASA Biopharmaceutical Section Regulatory-Industry Statistics Workshop Short course 2022-09-20 [Slides](https://r4csr.org/slides/fda-workshop-slides.html) 8 | PSI Webinar Series: Showcasing R use in Pharma Talk 2022-10-25 [Slides](https://r4csr.org/slides/r4csr-psi.html) 9 | -------------------------------------------------------------------------------- /fonts/InventionVF_Italics_W_Wght.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/fonts/InventionVF_Italics_W_Wght.woff2 -------------------------------------------------------------------------------- /fonts/InventionVF_W_Wght.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/fonts/InventionVF_W_Wght.woff2 -------------------------------------------------------------------------------- /images/cleanslate-addin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/images/cleanslate-addin.png -------------------------------------------------------------------------------- /images/pack.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Generate an asciicast SVG for pkglite::pack() output" 3 | output: rmarkdown::html_document 4 | --- 5 | 6 | ```{r, include=FALSE} 7 | knitr::opts_chunk$set( 8 | collapse = FALSE, 9 | comment = "#>", 10 | fig.path = "images/" 11 | ) 12 | ``` 13 | 14 | ```{r echo=FALSE, results="hide"} 15 | asciicast::init_knitr_engine(echo_input = FALSE) 16 | ``` 17 | 18 | ```{r, include=FALSE} 19 | options(asciicast_knitr_svg = TRUE) 20 | ``` 21 | 22 | ```{asciicast, pack} 23 | #' At: end 24 | library("pkglite") 25 | 26 | "esubdemo/" %>% 27 | collate(file_ectd(), file_auto("inst")) %>% 28 | pack(output = "r0pkgs.txt") 29 | ``` 30 | -------------------------------------------------------------------------------- /images/pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/images/pack.png -------------------------------------------------------------------------------- /images/pack.svg: -------------------------------------------------------------------------------- 1 | --Packingintopkglitefile-----------------------------------------------------Readingpackage:esubdemo---------------------------------------------------Reading".Rbuildignore"Reading"DESCRIPTION"Reading"NAMESPACE"Reading"README.md"Reading"R/count_by.R"Reading"R/fmt.R"Reading"R/utils-pipe.R"Reading"R/zzz.R"Reading"man/count_by.Rd"Reading"man/fmt_ci.Rd"Reading"man/fmt_est.Rd"Reading"man/fmt_num.Rd"Reading"man/fmt_pval.Rd"Reading"man/pipe.Rd"Reading"inst/pkgdown/assets/readme.txt"Reading"inst/pkgdown/templates/readme.txt"Reading"inst/startup.R"Writingto:"r0pkgs.txt" 2 | -------------------------------------------------------------------------------- /images/preview-txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/images/preview-txt.png -------------------------------------------------------------------------------- /images/rtf-after-update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/images/rtf-after-update.png -------------------------------------------------------------------------------- /images/rtf-alt-f9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/images/rtf-alt-f9.png -------------------------------------------------------------------------------- /index.qmd: -------------------------------------------------------------------------------- 1 | # Welcome {.unnumbered} 2 | 3 | Welcome to R for Clinical Study Reports and Submission. 4 | Clinical study reports (CSR) are crucial components in clinical trial development. 5 | A CSR is an "integrated" full scientific report of an individual clinical trials. 6 | 7 | The [ICH E3: Structure and Content of Clinical Study Reports](https://database.ich.org/sites/default/files/E3_Guideline.pdf) 8 | offers comprehensive instructions to sponsors on the creation of a CSR. 9 | This book is a clear and straightforward guide on using R to streamline the 10 | process of preparing CSRs. Additionally, it provides detailed guidance on the 11 | submission process to regulatory agencies. Whether you are a beginner or an 12 | experienced R programmer, this book is an indispensable asset in your 13 | clinical reporting toolkit. 14 | 15 | **This is a work-in-progress draft.** 16 | 17 | ::: {.content-visible when-format="html"} 18 | 19 | ## Events {.unnumbered} 20 | 21 | ```{css, echo=FALSE} 22 | .table { 23 | font-size: 0.825rem; 24 | } 25 | ``` 26 | 27 | ```{r, echo=FALSE} 28 | knitr::kable( 29 | read.table("events.tsv", 30 | stringsAsFactors = FALSE, 31 | header = TRUE, 32 | sep = "\t" 33 | ) 34 | ) 35 | ``` 36 | 37 | ::: 38 | -------------------------------------------------------------------------------- /preface.qmd: -------------------------------------------------------------------------------- 1 | # Preface {.unnumbered} 2 | 3 | ## Folder structure {.unnumbered} 4 | 5 | In the development of clinical trials, it is necessary to create and manage 6 | source code for generating and delivering Study Data Tabulation Model (SDTM), 7 | Analysis Dataset Model (ADaM) datasets, as well as tables, listings, and 8 | figures (TLFs). This is particularly evident in Phase 3 trials, where numerous 9 | TLFs are needed for submission. To effectively handle the large number of 10 | programs involved in such endeavors, it is essential to establish a consistent 11 | and well-defined folder structure for managing the analysis and reporting (A&R) 12 | project of a clinical trial. 13 | 14 | To streamline the organization of source code and documentation for a 15 | clinical trial A&R project, we suggest employing the R package folder structure. 16 | This folder structure is extensively utilized within the R community and is 17 | well-defined, often found in repositories like CRAN. By adopting this structure, 18 | you can benefit from a standardized and widely accepted framework for managing 19 | your A&R-related materials in an efficient and accessible manner. 20 | 21 | Using the R package folder structure provides a consistent approach that 22 | simplifies communication among developers, both within and across organizations. 23 | 24 | - For newcomers to R development, creating R packages is an essential step 25 | when sharing their work with others. The R community offers a widely adopted 26 | folder structure accompanied by excellent tutorials and free tools. 27 | - For an experienced R developer, there is a minimal learning curve. 28 | - For an organization, adopting the R package folder structure simplifies 29 | the development of processes, tools, templates, and training. 30 | It enables the use of a unified folder structure for building and 31 | maintaining standardized tool and analysis projects. 32 | 33 | The workflow around an R package can also improve the traceability and 34 | reproducibility of an analysis project [@marwick2018packaging]. 35 | 36 | We will revisit the folder structure topic when discussing project management 37 | for a clinical trial project. 38 | 39 | Additionally, the R package folder structure is also recommended for developing 40 | Shiny apps, as discussed in Chapter 20 of the 41 | [Mastering Shiny](https://mastering-shiny.org/scaling-packaging.html) book 42 | and the [Engineering Production-Grade Shiny Apps](https://engineering-shiny.org/golem.html) book. 43 | 44 | ## In this book {.unnumbered} 45 | 46 | This book is designed for intermediate-level readers who possess knowledge 47 | in both R programming and clinical development. Each part of the book makes 48 | certain assumptions about the readers' background: 49 | 50 | - Part 1, titled "Delivering TLFs in CSR", provides general information and 51 | examples on creating tables, listings, and figures. It assumes that readers 52 | are individual contributors to a clinical project with prior experience in 53 | R programming. Familiarity with data manipulation in R is expected. 54 | Some recommended references for this part include 55 | [Hands-On Programming with R](https://rstudio-education.github.io/hopr/), 56 | [R for Data Science](https://r4ds.had.co.nz/), and 57 | [Data Manipulation with R](https://doi.org/10.1007/978-0-387-74731-6). 58 | 59 | - Part 2, titled "Clinical trial project", provides general information and 60 | examples on managing a clinical trial A&R project. It assumes that readers 61 | are project leads who have experience in R package development. 62 | Recommended references for this part include 63 | [R Packages](https://r-pkgs.org/) and the 64 | [tidyverse style guide](https://style.tidyverse.org/). 65 | 66 | - Part 3, titled "eCTD submission package", provides general information on 67 | preparing submission packages related to the CSR in the 68 | electronic Common Technical Document (eCTD) format. 69 | It assumes that readers are project leads of clinical projects who possess 70 | experience in R package development and submission. 71 | 72 | ## Philosophy {.unnumbered} 73 | 74 | We share the same philosophy described in the introduction of the 75 | [R Packages](https://r-pkgs.org/introduction.html#sec-intro-phil) 76 | book [@wickham2023r], which we quote below: 77 | 78 | - "Anything that can be automated, should be automated." 79 | - "Do as little as possible by hand. Do as much as possible with functions." 80 | 81 | ## Authors and contributors {.unnumbered} 82 | 83 | This document is a collaborative effort maintained by a community. 84 | As you read through it, you also have the opportunity to contribute 85 | and enhance its quality. Your input and involvement play a vital role 86 | in shaping the excellence of this document. 87 | 88 | - Authors: made significant contributions to at least one chapter, 89 | constituting the majority of the content. 90 | 91 | [Yilong Zhang](https://elong0527.github.io/), 92 | [Nan Xiao](https://nanx.me/), 93 | [Keaven Anderson](https://keaven.github.io/), 94 | [Yalin Zhu](https://yalin.netlify.app/) 95 | 96 | - Contributors: contributed at least one commit to the 97 | [source code](https://github.com/elong0527/r4csr). 98 | 99 | ```{r, results = "asis", echo = FALSE, message = FALSE} 100 | contributors <- read.csv("contributors.csv", stringsAsFactors = FALSE, na.strings = "") 101 | contributors$desc <- with(contributors, ifelse(is.na(username), trimws(name), paste0(trimws(name), " (\\@", trimws(username), ")"))) 102 | cat(" We are grateful for all the improvements brought by these contributors (in chronological order): ", sep = "") 103 | cat(paste0(contributors$desc, collapse = ", ")) 104 | cat(".\n") 105 | ``` 106 | -------------------------------------------------------------------------------- /project-management.qmd: -------------------------------------------------------------------------------- 1 | # Project management {#sec-manage} 2 | 3 | ## Setting up for success 4 | 5 | A clinical data analysis project is not unlike typical data analysis projects or software projects. 6 | Therefore, the conventional wisdom and tricks for managing a successful project are also applicable here. 7 | At the same time, clinical projects also have unique traits, 8 | such as high standards for planning, development, validation, and delivery 9 | under strict time constraints. 10 | 11 | Although many factors determine if a project can execute efficiently, 12 | we believe a few aspects are critical for long-term success, 13 | especially when managing clinical data analysis projects at scale. 14 | 15 | ### Work as a team 16 | 17 | As a general principle, all the team members involved in a project 18 | should take basic training on project management and understand how to work as 19 | a development team. 20 | @teamgeek provides some valuable tips on this topic. 21 | As always, setting a clear goal and following a system development lifecycle 22 | (SDLC) is essential. 23 | 24 | ### Design clean code architecture 25 | 26 | Having a clean architecture design for your code improves the project's 27 | robustness and flexibility for future changes. 28 | For example, we should understand how to separate business logic from other layers; 29 | know what should be created as reusable components and what should be 30 | written as one-off analysis scripts; write low coupling, high cohesion code, 31 | and so on. 32 | @cleanarch offers some helpful insights on this topic. 33 | 34 | ### Set capability boundaries 35 | 36 | Knowing what you can do is essential. 37 | Create a core capabilities list for your team. 38 | 39 | Sometimes, it is also critical to understand **what not to do**. 40 | For example, the hidden cost of integrating with external systems 41 | or involving other programming languages can be prohibitively high. 42 | Remember, a simple, robust solution is almost always preferable to 43 | a complex solution that requires high maintenance and constant attention. 44 | 45 | ### Contribute to the community 46 | 47 | Every individual is limited in some way. 48 | The collective thinking from a community could benefit a project in the long term. 49 | When designing reusable components, make a plan to share with 50 | internal communities, or even better, with the open-source community. 51 | 52 | ## The SDLC 53 | 54 | For A&R deliverables in clinical project development, 55 | a clearly defined process or system development lifecycle (SDLC) 56 | is crucial to ensure regulatory compliance. 57 | 58 | SDLC for the A&R deliverables can be defined in four stages. 59 | 60 | - Planning: a planning stage to define the scope of a project. 61 | - Development: a development stage to implement target deliverables. 62 | - Validation: a validation stage to verify target deliverables. 63 | - Operation: an operation stage to deliver work to stakeholders. 64 | 65 | Importantly, we should not consider SDLC as a linear process. 66 | For example, if the study team identifies a new requirement in a development or validation stage, 67 | the team should return to the planning stage to discuss and align the scope. 68 | An [agile project management](https://www.atlassian.com/agile/project-management) approach is suitable 69 | and recommended for an A&R clinical development project. 70 | The goal is to embrace an iterative approach that continuously improves target deliverables based on 71 | frequent stakeholder feedback. 72 | 73 | There are many good tools to implement agile project management strategy, for example: 74 | 75 | - [GitHub project board](https://docs.github.com/en/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards) 76 | - [Jira](https://www.atlassian.com/software/jira) 77 | 78 | ## Planning 79 | 80 | The planning stage is important in the SDLC lifecycle 81 | as the requirements for all A&R deliverables are gathered and documented. 82 | 83 | In the planning stage, a project leader should identify all the deliverables, 84 | e.g., a list of tables, listings, and figures (TLFs). 85 | For each TLFs, the team should prepare the necessary specifications: 86 | 87 | - mock-up tables 88 | - validation level (e.g., independent review or double programming) 89 | - etc. 90 | 91 | The project leader should also align work assignments with team members. 92 | The purpose is to answer the question of "who is doing what?" 93 | 94 | ```{r, echo=FALSE} 95 | library("kableExtra") 96 | 97 | df <- read.table("validation-tracker.tsv", stringsAsFactors = FALSE, header = FALSE, sep = "\t") 98 | 99 | df %>% 100 | kbl(col.names = NULL) %>% 101 | kable_classic(full_width = FALSE, html_font = "'Times New Roman', Times, serif", font_size = 16) %>% 102 | add_header_above( 103 | c( 104 | "Program Name" = 1, "Program Validation Category" = 1, 105 | "Who" = 1, "Status" = 1, "Who" = 1, "Status" = 1, "Who" = 1, "Status" = 1 106 | ), 107 | line = FALSE, 108 | extra_css = "border: 1px solid #000;" 109 | ) %>% 110 | add_header_above( 111 | c( 112 | "" = 2, "Requirement/Specification" = 2, 113 | "Developer Testing" = 2, "Independent Testing" = 2 114 | ), 115 | escape = FALSE, 116 | line = FALSE, 117 | extra_css = "border: 1px solid #000;" 118 | ) %>% 119 | column_spec(4, background = ifelse(df$V4 == "C", "#00ff00", "#ffff00")) %>% 120 | column_spec(6, background = ifelse(df$V6 == "C", "#00ff00", "#ffff00")) %>% 121 | column_spec(8, background = ifelse(df$V8 == "C", "#00ff00", "#ffff00")) %>% 122 | column_spec(1, extra_css = "border: 1px solid #000; text-align: left;") %>% 123 | column_spec(2:8, extra_css = "border: 1px solid #000; text-align: center;") 124 | ``` 125 | 126 |

127 | 128 | The project lead should also set up a project folder, as discussed in @sec-folder. 129 | The project initiation can be simplified by creating an 130 | [RStudio project template](https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html). 131 | 132 | To enable reproducibility, the project leader should also review the startup file 133 | (i.e. `.Rprofile` discussed in @sec-reproduce) and define: 134 | 135 | - R version 136 | - Repository of R packages with a snapshot date 137 | - Project package library path 138 | - etc. 139 | 140 | ::: {.callout-caution} 141 | After project initiation, modifying `.Rprofile` will be a risk for 142 | reproducibility and should be handled carefully if necessary. 143 | ::: 144 | 145 | ## Development 146 | 147 | After a project is initiated, the study team starts to develop TLFs based on 148 | pre-defined mock-up tables assigned to each team member. 149 | 150 | The analysis code and relevant description can be saved in R Markdown files 151 | in the `vignettes/` folder. 152 | 153 | The use of R Markdown allows developers to assemble narrative text, code, and its 154 | comments in one place to simplify documentation. 155 | It would be helpful to create a template and define a name convention for all TLFs deliverables. 156 | For example, we can use the `tlf_` prefix in the filename to indicate that the R Markdown file is for delivering TLFs. 157 | Multiple TLFs with similar designs can be included in one R Markdown file. 158 | 159 | For example, in the `esubdemo` project, we have six R Markdown files to create TLFs. 160 | 161 | If there are any project-specific R functions that need to be developed, 162 | the R functions can be placed in the `R/` folder as discussed in 163 | @sec-consistency. 164 | 165 | ## Validation 166 | 167 | Validation is a crucial stage to ensure the deliverables are accurate and consistent. 168 | After the development stage is completed, the project team needs to validate the deliverables, including R Markdown 169 | files for TLFs deliverables and project-specific R functions. 170 | The level of validation is determined at the define stage. 171 | 172 | In an R package development, the validation or testing is completed under the `test/` folder. 173 | The testthat R package can be used to streamline the validation process. 174 | More details of the testthat package for R package validation can be found in [Chapter 12 of the R package book](https://r-pkgs.org/testing-basics.html). 175 | 176 | It is recommended to have a name convention to indicate the type of validation. 177 | For example, we can use `test-developer-test`, `test-independent-test`, `test-double-programming` 178 | to classify the validation type. 179 | 180 | It is recommended to follow the same organization 181 | for files in testthat folder as `R/` folder and `vignettes/` folder. 182 | Every single file in the `R/` folder and `vignettes/` folder should have a testing file saved in 183 | the `tests/testthat/` folder to validate the content. 184 | 185 | For example, in `esubdemo` project, we can have a list of testing files below. 186 | 187 | ``` 188 | tests/testthat 189 | ├── test-independent-test-tlf-01-disposition.R 190 | ├── test-independent-test-tlf-02-population.R 191 | ├── test-independent-test-tlf-03-baseline.R 192 | ├── test-independent-test-tlf-04-efficacy.R 193 | ├── test-independent-test-tlf-05-ae-summary.R 194 | ├── test-independent-test-tlf-06-ae-spec.R 195 | └── test-independent-test-fmt.R 196 | ``` 197 | 198 | To validate the content of a table, we can save the last datasets ready for table generation as a `.Rdata` file. 199 | A validator can reproduce the TLF and compare it with the original result saved in the `.Rdata` file. 200 | A test is passed when the results match. 201 | Customers can directly review the formatting of the TLFs by comparing them with the mock-up. 202 | 203 | To validate a figure, we can use the [snapshot testing](https://testthat.r-lib.org/articles/snapshotting.html) strategy. 204 | 205 | After the validator completes the testing of project-specific functions and R Markdown files, 206 | the process to execute and report testing results is the same for a standard R package. 207 | The `devtools::test()` function automatically executes all testing cases and summarizes the testing results in a report. 208 | 209 | After completing the validation, the validator updates the status in a validation tracker. 210 | The project lead reviews the tracking sheet to make sure all required activities in the SDLC are completed, 211 | and the tracking sheet has been filled correctly. 212 | The deliverables are ready for customer review after all the validation steps are completed. 213 | Any changes to the output requested by customers are documented. 214 | 215 | ## Operation 216 | 217 | After completion of development and required validation of all A&R deliverables, 218 | the project lead runs compliance checks for a project-specific R package similar to other R packages. 219 | `devtools::check()` is a convenient way to run compliance checks or `R CMD check`. 220 | `R CMD check` is an automated check of the contents in the R package 221 | for frequently encountered issues before submission to CRAN. 222 | Since the project-specific R package is not submitted to CRAN, some checks can be customized and skipped in `devtools::check()`. 223 | The project lead should work with the study team to ensure 224 | all reported errors, warnings, and notes by `devtools::check()` are fixed. 225 | 226 | The project lead can also use the R package pkgdown to build a complete website for a project-specific R package. 227 | The pkgdown website is a convenient way to run all analyses in batch and 228 | integrate outputs in a website, which comprehensively covers 229 | project-specific R functions, TLF generation programs, outputs and validation tracking information, etc. 230 | For example, in the `esubdemo` project, we created the pkgdown website at . 231 | 232 | Many of the tasks in SDLC can be completed automatically. 233 | An organization can leverage CI/CD workflow to automatically enable those tasks, 234 | such as running testing cases and creating a pkgdown website. 235 | For example, in the `esubdemo` project, we set up 236 | [GitHub Actions](https://github.com/elong0527/esubdemo/actions) 237 | for it. This can be done by using `usethis::use_github_action()`. 238 | -------------------------------------------------------------------------------- /project-overview.qmd: -------------------------------------------------------------------------------- 1 | # Overview {#project-overview} 2 | 3 | In a late-stage clinical trial, the number of A&R deliverables can easily be in the hundreds. 4 | For an organization, it is common to have multiple ongoing clinical trials in a clinical program. 5 | 6 | To deliver the A&R results of a clinical trial project, 7 | it is teamwork that typically requires collaborations from both statisticians and programmers. 8 | In this part, let's consider how to organize a clinical trial project as an A&R lead. 9 | 10 | @sec-folder will discuss how to organize source code, documents, and 11 | deliverables in an A&R clinical project. 12 | We recommend using the R package folder structure. 13 | 14 | @sec-manage will discuss a process or system development lifecycle 15 | to manage the A&R of a clinical project. 16 | We recommend following an agile management approach to define, develop, validate, and deliver work. 17 | -------------------------------------------------------------------------------- /r4csr.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | StripTrailingWhitespace: Yes 16 | -------------------------------------------------------------------------------- /references.bib: -------------------------------------------------------------------------------- 1 | @book{cleanarch, 2 | title = {Clean architecture: a craftsman's guide to software structure and design}, 3 | author = {Martin, Robert C and Grenning, James and Brown, Simon}, 4 | year = {2018}, 5 | publisher = {Prentice Hall} 6 | } 7 | 8 | @conference{madhutest, 9 | title = {A Process to Validate Internal Developed {R} Package under Regulatory Environment}, 10 | author = {Ginnaram, Madhusudhan and Ye, Simiao and Zhu, Yalin and Zhang, Yilong}, 11 | year = {2021}, 12 | publisher = {PharmaSUG} 13 | } 14 | 15 | @article{marwick2018packaging, 16 | title = {Packaging data analytical work reproducibly using {R} (and friends)}, 17 | author = {Marwick, Ben and Boettiger, Carl and Mullen, Lincoln}, 18 | journal = {The American Statistician}, 19 | volume = {72}, 20 | number = {1}, 21 | pages = {80--88}, 22 | year = {2018}, 23 | publisher = {Taylor \& Francis} 24 | } 25 | 26 | @article{RJ-2020-007, 27 | author = {Daniel Nüst and Dirk Eddelbuettel and Dom Bennett and 28 | Robrecht Cannoodt and Dav Clark and Gergely Daróczi and 29 | Mark Edmondson and Colin Fay and Ellis Hughes and Lars 30 | Kjeldgaard and Sean Lopp and Ben Marwick and Heather Nolis 31 | and Jacqueline Nolis and Hong Ooi and Karthik Ram and Noam 32 | Ross and Lori Shepherd and Péter Sólymos and Tyson Lee 33 | Swetnam and Nitesh Turaga and Charlotte Van Petegem and 34 | Jason Williams and Craig Willis and Nan Xiao}, 35 | title = {The {Rockerverse}: Packages and Applications for 36 | Containerisation with {R}}, 37 | year = {2020}, 38 | journal = {{The R Journal}}, 39 | pages = {437--461}, 40 | volume = {12}, 41 | number = {1} 42 | } 43 | 44 | @book{teamgeek, 45 | title = {Team geek: a software developer's guide to working well with others}, 46 | author = {Fitzpatrick, Brian and Collins-Sussman, Ben}, 47 | year = {2012}, 48 | publisher = {O'Reilly Media} 49 | } 50 | 51 | @book{wickham2023r, 52 | title = {R packages}, 53 | author = {Wickham, Hadley and Bryan, Jennifer}, 54 | year = {2023}, 55 | publisher = {O'Reilly Media, Inc.} 56 | } 57 | 58 | @conference{wuanalysis, 59 | title = {Analysis and Reporting in Regulated Clinical Trial Environment using {R}}, 60 | author = {Wu, Peikun and Palukuru, Uday Preetham and Luo, Yiwen and Nepal, Sarad and Zhang, Yilong}, 61 | year = {2021}, 62 | publisher = {PharmaSUG} 63 | } 64 | 65 | @article{zhao2023electronic, 66 | title = {Electronic common technical document submission with analysis using {R}}, 67 | author = {Zhao, Yujie and Xiao, Nan and Anderson, Keaven and Zhang, Yilong}, 68 | journal = {Clinical Trials}, 69 | volume = {20}, 70 | number = {1}, 71 | pages = {89--92}, 72 | year = {2023}, 73 | publisher = {SAGE Publications Sage UK: London, England} 74 | } -------------------------------------------------------------------------------- /references.qmd: -------------------------------------------------------------------------------- 1 | # References {.unnumbered} 2 | 3 | ::: {#refs} 4 | ::: 5 | -------------------------------------------------------------------------------- /slides/china-r.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "R for Clinical Study Reports and Submission" 3 | subtitle: "The China-R Conference" 4 | author: "Yilong Zhang, Nan Xiao, Yujie Zhao, Keaven Anderson" 5 | date: "November 2021" 6 | output: 7 | mkdocs::mk_ioslides_presentation: 8 | mk_logo: "msd" 9 | mk_col_title: "white" 10 | mk_col_section: "teal" 11 | mk_class: "public" 12 | widescreen: true 13 | --- 14 | 15 | ```{r setup, include=FALSE} 16 | knitr::opts_chunk$set(echo = TRUE) 17 | library(dplyr) 18 | library(tidyr) 19 | library(r2rtf) 20 | library(ggplot2) 21 | data("r2rtf_adae") 22 | ``` 23 | 24 | ## Disclaimer 25 | 26 | - All opinions expressed are those of the presenter and not 27 | Merck Sharp & Dohme Corp., a subsidiary of Merck & Co., Inc., Kenilworth, NJ, USA. 28 | 29 | - Some slides need to be scrolled down to see the full content. 30 | 31 | ## Background 32 | 33 | - Clinical study report is a key deliverable for clinical trials to regulatory agencies. (e.g., FDA, CFDA) 34 | - [ICH E3 Structure and Content of Clinical Study Reports](https://database.ich.org/sites/default/files/E3_Guideline.pdf) 35 | 36 | - We try to fill in gaps to streamline workflow using R: 37 | - To develop, validate, deliver analysis results. 38 | - To submit analysis results to regulatory agencies in [eCTD format](https://en.wikipedia.org/wiki/Electronic_common_technical_document). 39 | 40 | - Focus on table, listing, figure (TLFs) delivered in RTF/Microsoft Word format 41 | - In the pharmaceutical industry, RTF/Microsoft Word play a central role in preparing clinical study reports. 42 | - Different organization can have different table standards 43 | 44 | ## Clarification from FDA 45 | 46 | - [FDA: Statistical Software Clarifying Statement](https://www.fda.gov/media/161196/download) 47 | 48 | "FDA does not require use of any specific software for statistical analyses, and statistical software 49 | is not explicitly discussed in Title 21 of the Code of Federal Regulations [e.g., in 21CFR part 50 | 11]. However, the software package(s) used for statistical analyses should be fully documented 51 | in the submission, including version and build identification." 52 | 53 | ## Requirement from FDA 54 | 55 | - [FDA Study Data Technical Conformance Guide](https://www.fda.gov/media/88173/download): 56 | 57 | > "Sponsors should provide the software programs used to create all ADaM 58 | datasets and **generate tables and figures associated with primary and 59 | secondary efficacy analyses**. Furthermore, sponsors should submit software 60 | programs used to generate additional information included in Section 14 61 | CLINICAL STUDIES of the Prescribing Information (PI)26 if applicable. 62 | **The specific software utilized should be specified in the ADRG**. 63 | The main purpose of requesting the submission of these programs 64 | **is to understand the process by which the variables for the respective 65 | analyses were created and to confirm the analysis algorithms**. 66 | Sponsors should submit software programs in **ASCII text format**; 67 | however, executable file extensions should not be used." 68 | 69 | ## Philosophy 70 | 71 | We share the same philosophy described in 72 | [Section 1.1 of the R Packages book](https://r-pkgs.org/introduction.html#intro-phil) and quote here. 73 | 74 | - "Anything that can be automated, should be automated." 75 | - "Do as little as possible by hand. Do as much as possible with functions." 76 | - "The goal is to spend your time thinking about what you want to do 77 | rather than thinking about the minutiae of package structure." 78 | 79 | ## Tools for study design 80 | 81 | > Details will be skipped in today's talk. 82 | 83 | Tools: 84 | 85 | - [`gsDesign`](https://github.com/keaven/gsDesign): an R package for group sequential design under proportional hazards. 86 | - [`simtrial`](https://github.com/Merck/simtrial): an experimental R package for simulation-based group sequential design under non-proportional hazards 87 | - [`gsDesign2`](https://github.com/Merck/gsDesign2) and 88 | [`gsdmvn`](https://github.com/Merck/gsdmvn): 89 | an experimental R package for analytical-based group sequential design under proportional hazards. 90 | 91 | Bookdown: 92 | 93 | Training: [December 6th, Deming Conference 2021](https://web.archive.org/web/20220531042701/https://demingconference.org/wp-content/uploads/2021/11/2021-Deming-Conference-Virtual-Printed-Program-v1.1.pdf) 94 | 95 | ## Tools for reporting and submission 96 | 97 | Tools: 98 | 99 | - [r2rtf](https://merck.github.io/r2rtf/): create production-ready tables and figures in RTF format. 100 | - [`pkglite`](https://merck.github.io/pkglite/): represent and exchange R package source code as text files. 101 | - `cleanslate` (under internal validation): create portable R environments. 102 | 103 | Bookdown: 104 | 105 | Training: [December 2nd, Short course for ASA Princeton-Trenton Chapter](https://rutgers.webex.com/rutgers/j.php?RGID=rc0a71b2f239233a7850a121cf972045f) 106 | 107 | ## r2rtf: design 108 | 109 | r2rtf is designed to: 110 | 111 | - Generate highly customized tables 112 | - Limit package dependency 113 | - Target regulatory deliverable 114 | - Support pipes (`%>%`) 115 | 116 | ## r2rtf: minimal example 117 | 118 | r2rtf is designed to be pipe-friendly (`%>%`) 119 | 120 | ```{r, echo = TRUE, eval = FALSE} 121 | head(iris) %>% 122 | rtf_body() %>% # Step 1 Add table attributes 123 | rtf_encode() %>% # Step 2 Convert attributes to RTF encode 124 | write_rtf("minimal.rtf") # Step 3 Write to a .rtf file 125 | ``` 126 | 127 | ```{r, out.width = "100%", out.height = "400px", echo = FALSE, fig.align = "center"} 128 | knitr::include_graphics("minimal.pdf") 129 | ``` 130 | 131 | ## r2rtf: function illustration 132 | 133 | ```{r, out.width="100%", echo=FALSE, fig.align="center"} 134 | knitr::include_graphics("function-summary.png") 135 | ``` 136 | 137 | ## pkglite: compact package representations 138 | 139 | `pkglite` reimagines the way to represent R packages. 140 | 141 | - A **tool** for packing and restoring R packages as plaintext 142 | assets that are easy to store, transfer, and review 143 | - A **grammar** for specifying the file packing scope that is 144 | functional, precise, and extendable 145 | - A **standard** for exchanging the packed asset that is 146 | unambiguous, human-friendly, and machine-readable 147 | 148 | ```{r, eval=FALSE} 149 | library("pkglite") 150 | 151 | "/path/to/pkg/" %>% 152 | collate(file_ectd(), file_auto("inst/")) %>% 153 | pack() 154 | 155 | pack( 156 | "/path/to/pkg1/" %>% collate(file_ectd()), 157 | "/path/to/pkg2/" %>% collate(file_ectd()), 158 | output = "/path/to/pkglite.txt" 159 | ) 160 | 161 | "/path/to/pkglite.txt" %>% unpack(output = "/path/to/output/", install = TRUE) 162 | ``` 163 | 164 | Website: 165 | 166 | ## cleanslate: portable R environments 167 | 168 | - Create a project folder with specific context (`.Rproj`, `.Rprofile`, `.Renviron`) 169 | - Install a specific version of R into the project folder 170 | - Install a specific version of Rtools into the project folder 171 | - (without administrator privileges) 172 | 173 | ```{r, eval=FALSE} 174 | library("cleanslate") 175 | 176 | "portable-project/" %>% 177 | use_project(repo = "https://url/snapshot/2021-11-20/") %>% 178 | use_rprofile() %>% 179 | use_renviron() %>% 180 | use_r_version(version = "4.1.1") %>% 181 | use_rtools(version = "rtools40") 182 | ``` 183 | 184 | ## Summary of workflow as user stories 185 | 186 | Within a regulatory R environment: 187 | 188 | - As a statistician, I use tidyverse, r2rtf, and internal tools to define the mock-up table, listing and figure (TLFs) for statistical analysis of a clinical trial. 189 | - More than 100 TLFs for efficacy and safety of a drug or vaccine. 190 | 191 | - As a programmer, I use tidyverse, r2rtf, and internal tools to develop and/or validate analysis results based on mock-up TLFs. 192 | 193 | - As a statistican/programmer, I use `pkglite` and internal tools to prepare proprietary R packages and analysis R scripts for eCTD submission package. 194 | 195 | - As an internal/external reviewer, I use `cleanslate` to re-construct a portable environment (if required) to reproduce analysis results. 196 | 197 | More details: 198 | 199 | ## Folder structure 200 | 201 | We recommended to use **R package structure** to organize standard tools, analysis projects, and Shiny apps. 202 | 203 | - Consistency: everyone works on the same folder structure. 204 | - Reproducibility: analysis can be executed and reproduced by different team members months/years later. 205 | - Automation: automatically check the integration of a project. 206 | - Compliance: reduce compliance issues. 207 | 208 | More details: 209 | 210 | Example: 211 | 212 | ## Project management 213 | 214 | - Setting up for success 215 | - Work as a team 216 | - Design clean code architecture 217 | - Set capability boundaries 218 | - Contribute to the community 219 | 220 | - The Software Development Life Cycle 221 | - Planning: define the scope of a project 222 | - Development: mplement target deliverables 223 | - Validation: verify target deliverables 224 | - Operation: deliver work to stakeholders 225 | 226 | More details: 227 | 228 | ## Cross-industry collaborations 229 | 230 | - R Validation Hub: 231 | - Focus on designing a framework that assesses the quality of an R package 232 | - Presentations: 233 | 234 | - R-based submission pilots to FDA: 235 | - 236 | - Focus on improving practices of R-based clinical trial regulatory submission. 237 | 238 | - R/Pharma: 239 | - Annual conference focus on the use of R in the development of pharmaceuticals. 240 | 241 | - R Consortium R Adoption Seminar Series 242 | - 243 | 244 | ## Future directions 245 | 246 | - Enhance compliance, reproducibility, traceability, and automation 247 | - Automation of analysis, documentation, review, and testing 248 | - Linkage among data, TLFs, and final reports 249 | - R package qualification 250 | - Enable advanced study design and statistical methods 251 | - Introduce interactive visualization and reporting (with/without backend server) 252 | 253 | ## Join us 254 | 255 | - Contact us for R developer or Methodology Research Positions: 256 | - Yilong Zhang: 257 | - Nan Xiao: 258 | - Keaven Anderson: 259 | 260 | - Multiple open positions (statisticians/programmers) in China, EU, and US 261 | - US: 262 | - China/EU: 263 | 264 | # Thank you {.thank-you} 265 | -------------------------------------------------------------------------------- /slides/function-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/slides/function-summary.png -------------------------------------------------------------------------------- /slides/minimal.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/slides/minimal.pdf -------------------------------------------------------------------------------- /slides/minimal.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx1800 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3600 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5400 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7200 28 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Sepal.Length}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Sepal.Width}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Petal.Length}\cell 32 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Petal.Width}\cell 33 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Species}\cell 34 | \intbl\row\pard 35 | \trowd\trgaph108\trleft0\trqc 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\cellx1800 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\cellx3600 38 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\cellx5400 39 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\cellx7200 40 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\cellx9000 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.1}\cell 42 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.5}\cell 43 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.4}\cell 44 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.2}\cell 45 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 setosa}\cell 46 | \intbl\row\pard 47 | \trowd\trgaph108\trleft0\trqc 48 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx1800 49 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx3600 50 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx5400 51 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx7200 52 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\cellx9000 53 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4.9}\cell 54 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 55 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.4}\cell 56 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.2}\cell 57 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 setosa}\cell 58 | \intbl\row\pard 59 | \trowd\trgaph108\trleft0\trqc 60 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx1800 61 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx3600 62 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx5400 63 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx7200 64 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\cellx9000 65 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4.7}\cell 66 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.2}\cell 67 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.3}\cell 68 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.2}\cell 69 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 setosa}\cell 70 | \intbl\row\pard 71 | \trowd\trgaph108\trleft0\trqc 72 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx1800 73 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx3600 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx5400 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx7200 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\cellx9000 77 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4.6}\cell 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.1}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.5}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.2}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 setosa}\cell 82 | \intbl\row\pard 83 | \trowd\trgaph108\trleft0\trqc 84 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx1800 85 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx3600 86 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx5400 87 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\cellx7200 88 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\cellx9000 89 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5}\cell 90 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.6}\cell 91 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.4}\cell 92 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.2}\cell 93 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 setosa}\cell 94 | \intbl\row\pard 95 | \trowd\trgaph108\trleft0\trqc 96 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\cellx1800 97 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\cellx3600 98 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\cellx5400 99 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\cellx7200 100 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\cellx9000 101 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.4}\cell 102 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.9}\cell 103 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.7}\cell 104 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.4}\cell 105 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 setosa}\cell 106 | \intbl\row\pard 107 | 108 | 109 | 110 | } 111 | -------------------------------------------------------------------------------- /slides/r2rtf-function-summary.R: -------------------------------------------------------------------------------- 1 | # Generate an RTF table -------------------------------------------------------- 2 | # Example from 3 | 4 | library(r2rtf) 5 | library(dplyr) 6 | library(pdftools) 7 | library(magick) 8 | 9 | data(r2rtf_adae) 10 | 11 | ae_t1 <- r2rtf_adae[200:260, ] %>% 12 | mutate( 13 | SUBLINEBY = paste0( 14 | "Trial Number: ", STUDYID, 15 | ", Site Number: ", SITEID 16 | ), 17 | SUBJLINE = paste0( 18 | "Subject ID = ", USUBJID, 19 | ", Gender = ", SEX, 20 | ", Race = ", RACE, 21 | ", AGE = ", AGE, " Years", 22 | ", TRT = ", TRTA 23 | ), 24 | # create a subject line with participant's demographic information. 25 | # this is for page_by argument in rtf_body function 26 | AEDECD1 = tools::toTitleCase(AEDECOD), # propcase the AEDECOD 27 | DUR = paste(ADURN, ADURU, sep = " ") 28 | ) %>% # AE duration with unit 29 | select(USUBJID, ASTDY, AEDECD1, DUR, AESEV, AESER, AEREL, AEACN, AEOUT, TRTA, SUBJLINE, SUBLINEBY) # display variable using this order 30 | 31 | ae_tbl <- ae_t1 %>% 32 | # It is important to order variable properly. 33 | arrange(SUBLINEBY, TRTA, SUBJLINE, USUBJID, ASTDY) %>% 34 | rtf_page(orientation = "landscape", col_width = 9) %>% 35 | rtf_page_header() %>% 36 | rtf_page_footer(text = "CONFIDENTIAL") %>% 37 | rtf_title( 38 | "Listing of Subjects With Serious Adverse Events", 39 | "ASaT" 40 | ) %>% 41 | rtf_colheader( 42 | "Subject| Rel Day | Adverse | | | | |Action| |", 43 | col_rel_width = c(2.5, 2, 4, 2, 3, 2, 3, 2, 5) 44 | ) %>% 45 | rtf_colheader( 46 | "ID| of Onset | Event | Duration | Intensity | Serious | Related | Taken| Outcome", 47 | border_top = "", 48 | col_rel_width = c(2.5, 2, 4, 2, 3, 2, 3, 2, 5) 49 | ) %>% 50 | rtf_body( 51 | col_rel_width = c(2.5, 2, 4, 2, 3, 2, 3, 2, 5, 1, 1, 1), 52 | text_justification = c("l", rep("c", 8), "l", "l", "l"), 53 | text_format = c(rep("", 9), "b", "", "b"), 54 | border_top = c(rep("", 9), "single", "single", "single"), 55 | border_bottom = c(rep("", 9), "single", "single", "single"), 56 | subline_by = "SUBLINEBY", 57 | page_by = c("TRTA", "SUBJLINE"), 58 | group_by = c("USUBJID", "ASTDY") 59 | ) %>% 60 | rtf_footnote(c("This is a footnote. This is footnote 1.")) %>% 61 | rtf_source("Source: [Study MK9999P001: adam-adae]") 62 | 63 | path_rtf <- "slides/function-summary.rtf" 64 | 65 | ae_tbl %>% 66 | rtf_encode() %>% 67 | write_rtf(path_rtf) 68 | 69 | # Convert RTF to PDF ----------------------------------------------------------- 70 | 71 | path_pdf <- "slides/function-summary.pdf" 72 | 73 | r2rtf:::rtf_convert_format( 74 | path_rtf, 75 | output_file = basename(path_pdf), 76 | output_dir = dirname(path_pdf), 77 | format = "pdf", 78 | overwrite = TRUE 79 | ) 80 | 81 | # Convert PDF to PNG ----------------------------------------------------------- 82 | 83 | path_png <- "slides/function-summary.png" 84 | 85 | image_read_pdf(path_pdf, pages = 9, density = 300) %>% 86 | image_write(path = path_png) 87 | 88 | # Annotate PNG ----------------------------------------------------------------- 89 | 90 | img <- image_read(path_png) %>% image_border(color = "#FFFFFF", geometry = "300x1") 91 | 92 | img1 <- img %>% 93 | image_annotate( 94 | text = "rtf_page_header()", 95 | gravity = "northeast", location = "+970+375", 96 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 97 | ) %>% 98 | image_annotate( 99 | text = sprintf("\u2192"), 100 | gravity = "northeast", location = "+840+295", 101 | color = "#00857C", size = 200, font = "Liberation Mono" 102 | ) %>% 103 | image_annotate( 104 | text = "rtf_title()", 105 | gravity = "northeast", location = "+980+660", 106 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 107 | ) %>% 108 | image_annotate( 109 | text = sprintf("\u2190"), 110 | gravity = "northeast", location = "+1320+580", 111 | color = "#00857C", size = 200, font = "Liberation Mono" 112 | ) %>% 113 | image_annotate( 114 | text = "rtf_subline()", 115 | gravity = "northwest", location = "+1560+780", 116 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 117 | ) %>% 118 | image_annotate( 119 | text = sprintf("\u2190"), 120 | gravity = "northwest", location = "+1430+700", 121 | color = "#00857C", size = 200, font = "Liberation Mono" 122 | ) %>% 123 | image_annotate( 124 | text = "rtf_colheader()", 125 | gravity = "northwest", location = "+10+865", 126 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 127 | ) %>% 128 | image_annotate( 129 | text = sprintf("\u2192"), 130 | gravity = "northwest", location = "+470+785", 131 | color = "#00857C", size = 200, font = "Liberation Mono" 132 | ) %>% 133 | image_annotate( 134 | text = "rtf_body()", 135 | gravity = "northwest", location = "+160+945", 136 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 137 | ) %>% 138 | image_annotate( 139 | text = sprintf("\u2192"), 140 | gravity = "northwest", location = "+470+860", 141 | color = "#00857C", size = 200, font = "Liberation Mono" 142 | ) %>% 143 | image_annotate( 144 | text = "arg: page_by", 145 | gravity = "northwest", location = "+1150+945", 146 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 147 | ) %>% 148 | image_annotate( 149 | text = sprintf("\u2190"), 150 | gravity = "northwest", location = "+1015+860", 151 | color = "#00857C", size = 200, font = "Liberation Mono" 152 | ) %>% 153 | image_annotate( 154 | text = "arg: group_by", 155 | gravity = "northwest", location = "+890+1115", 156 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 157 | ) %>% 158 | image_annotate( 159 | text = sprintf("\u2190"), 160 | gravity = "northwest", location = "+760+1030", 161 | color = "#00857C", size = 200, font = "Liberation Mono" 162 | ) %>% 163 | image_annotate( 164 | text = "rtf_footnote()", 165 | gravity = "northwest", location = "+40+1620", 166 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 167 | ) %>% 168 | image_annotate( 169 | text = sprintf("\u2192"), 170 | gravity = "northwest", location = "+470+1540", 171 | color = "#00857C", size = 200, font = "Liberation Mono" 172 | ) %>% 173 | image_annotate( 174 | text = "rtf_source()", 175 | gravity = "northwest", location = "+2420+1690", 176 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 177 | ) %>% 178 | image_annotate( 179 | text = sprintf("\u2190"), 180 | gravity = "northwest", location = "+2290+1610", 181 | color = "#00857C", size = 200, font = "Liberation Mono" 182 | ) %>% 183 | image_annotate( 184 | text = "rtf_page_footer()", 185 | gravity = "northwest", location = "+1120+2110", 186 | color = "#FFFFFF", boxcolor = "#00857C", size = 50, font = "Liberation Mono" 187 | ) %>% 188 | image_annotate( 189 | text = sprintf("\u2192"), 190 | gravity = "northwest", location = "+1640+2030", 191 | color = "#00857C", size = 200, font = "Liberation Mono" 192 | ) 193 | 194 | # Trim and save PNG ------------------------------------------------------------ 195 | 196 | img1 %>% 197 | image_trim() %>% 198 | image_border(color = "#FFFFFF", geometry = "50x50") %>% 199 | image_write(path_png) 200 | 201 | # Remove intermediate files ---------------------------------------------------- 202 | 203 | unlink(c(path_rtf, path_pdf)) 204 | -------------------------------------------------------------------------------- /slides/r2rtf-functions.csv: -------------------------------------------------------------------------------- 1 | Functions,Purpose,Optional/required 2 | rtf_page_header(),add page header,optional 3 | rtf_title(),add title,optional 4 | rtf_subline(),add subject line ,optional 5 | rtf_colheader(),add column header,optional 6 | rtf_body(),add table body,required 7 | rtf_footnote(),add footnote,optional 8 | rtf_source(),add data source,optional 9 | rtf_page_footer(),add page footer,optional 10 | rtf_encode(),convert table into rtf code,required 11 | write_rtf(),write rtf code into .rtf file,required 12 | -------------------------------------------------------------------------------- /slides/reference.bib: -------------------------------------------------------------------------------- 1 | @article{diao2020efficient, 2 | title={Efficient multiple imputation for sensitivity analysis of recurrent events data with informative censoring}, 3 | author={Diao, Guoqing and Liu, Guanghan F and Zeng, Donglin and Zhang, Yilong and Golm, Gregory and Heyse, Joseph F and Ibrahim, Joseph G}, 4 | journal={Statistics in Biopharmaceutical Research}, 5 | pages={1--9}, 6 | year={2020}, 7 | publisher={Taylor \& Francis} 8 | } 9 | 10 | @article{gao2017control, 11 | title={Control-based imputation for sensitivity analyses in informative censoring for recurrent event data}, 12 | author={Gao, Fei and Liu, Guanghan F and Zeng, Donglin and Xu, Lei and Lin, Bridget and Diao, Guoqing and Golm, Gregory and Heyse, Joseph F and Ibrahim, Joseph G}, 13 | journal={Pharmaceutical statistics}, 14 | volume={16}, 15 | number={6}, 16 | pages={424--432}, 17 | year={2017}, 18 | publisher={Wiley Online Library} 19 | } 20 | 21 | @article{lachin1986evaluation, 22 | title={Evaluation of sample size and power for analyses of survival with allowance for nonuniform patient entry, losses to follow-up, noncompliance, and stratification}, 23 | author={Lachin, John M and Foulkes, Mary A}, 24 | journal={Biometrics}, 25 | pages={507--519}, 26 | year={1986}, 27 | publisher={JSTOR} 28 | } 29 | 30 | @article{liu2021multiply, 31 | title={Multiply robust estimators in longitudinal studies with missing data under control-based imputation}, 32 | author={Liu, Siyi and Yang, Shu and Zhang, Yilong and others}, 33 | journal={arXiv preprint arXiv:2112.06000}, 34 | year={2021} 35 | } 36 | 37 | @article{zhao2022electronic, 38 | title={Electronic common technical document submission with analysis using R}, 39 | author={Zhao, Yujie and Xiao, Nan and Anderson, Keaven and Zhang, Yilong}, 40 | journal={Clinical Trials}, 41 | pages={17407745221123244}, 42 | year={2022}, 43 | publisher={SAGE Publications Sage UK: London, England} 44 | } 45 | -------------------------------------------------------------------------------- /slides/render.R: -------------------------------------------------------------------------------- 1 | rmarkdown::render("slides/workshop-slides.Rmd") 2 | rmarkdown::render("slides/china-r.Rmd") 3 | rmarkdown::render("slides/r4csr-gwu.Rmd") 4 | rmarkdown::render("slides/r4csr-rstudio.Rmd") 5 | rmarkdown::render("slides/fda-workshop-slides.Rmd") 6 | rmarkdown::render("slides/r4csr-psi.Rmd") 7 | -------------------------------------------------------------------------------- /slides/reproducibility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/slides/reproducibility.png -------------------------------------------------------------------------------- /slides/submission-group-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/slides/submission-group-logo.png -------------------------------------------------------------------------------- /slides/workshop-slides.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "R for Clinical Study Reports and Submission" 3 | subtitle: "ASA Princeton-Trenton Chapter" 4 | author: "Yilong Zhang, Nan Xiao" 5 | date: "December 2021" 6 | output: 7 | mkdocs::mk_ioslides_presentation: 8 | mk_logo: "invent" 9 | mk_col_title: "white" 10 | mk_col_section: "teal" 11 | mk_class: "public" 12 | widescreen: true 13 | --- 14 | 15 | ```{r setup, include=FALSE} 16 | knitr::opts_chunk$set(comment = "#>", echo = FALSE) 17 | ``` 18 | 19 | ```{r, include=FALSE} 20 | library(dplyr) 21 | library(tidyr) 22 | library(r2rtf) 23 | ``` 24 | 25 | # Welcome 26 | 27 | ## Outline 28 | 29 | In this workshop, we have three parts: 30 | 31 | - Delivering TLFs in CSR (Yilong Zhang) 32 | - Session 1 (45 min) 33 | - Break and/or Exercise (20 min) 34 | - Session 2 (45 min) 35 | - Break (10 min) 36 | - Clinical trial project (Nan Xiao) 37 | - Session 3 (30 min) 38 | - Break (10 min) 39 | - eCTD submission package (Nan Xiao) 40 | - Session 4 (40 min) 41 | - Q&A (10 min) 42 | 43 | ## Disclaimer 44 | 45 | - All opinions expressed are those of the presenter and not 46 | Merck Sharp & Dohme Corp., a subsidiary of Merck & Co., Inc., Kenilworth, NJ, USA. 47 | 48 | - Some slides need to be scrolled down to see the full content. 49 | 50 | ## Training objective 51 | 52 | - Learning how to create tables for clinical study reports. 53 | - Learning how to organize a clinical development project. 54 | - Learning how to prepare eCTD submission package to FDA. 55 | 56 | > The toolchain, process, and formats may be different in different organizations. 57 | > We only provide a recommended way to address them. 58 | 59 | ## Acknowledgement 60 | 61 | - Team members from Merck & Co. 62 | - [We are hiring!](https://jobs.merck.com/bards) 63 | - Contact us if interested. 64 | 65 | - [Contributors](https://r4csr.org/) of the training materials. 66 | - Please consider submitting issues or PR in the repo. 67 | 68 | - [R Consortium](https://www.r-consortium.org/all-projects/isc-working-groups) 69 | - R validation hub 70 | - Submission working group 71 | - R Tables for Regulatory Submission (RTRS) working group 72 | - Please consider to join and contribute to a working group. 73 | 74 | - [ASA Princeton-Trenton Chapter](https://community.amstat.org/princetontrenton/home) 75 | - Please consider to be a member of our chapter. 76 | 77 | 84 | 85 | ## Preparation 86 | 87 | In this workshop, we assume you have 88 | some R programming experience and clinical development knowledge. 89 | 90 | - Data manipulation: tidyverse, dplyr, tidyr, ggplot2 etc. 91 | - ADaM data: `adsl`, `adae` etc. 92 | 93 | ```{r, echo = TRUE, eval = FALSE} 94 | install.packages(c( 95 | "tidyverse", # Data manipulation 96 | "r2rtf", # TLF generation 97 | "pkglite" # eCTD submission 98 | )) 99 | ``` 100 | 101 | ## Resource 102 | 103 | - Training Material: 104 | - Demo project: 105 | - Analysis project: 106 | - eCTD submission package: 107 | - R Consortium FDA submission pilot: 108 | - 109 | 110 | - During the workshop, we will use `esubdemo` project. 111 | - `esubdemo` is shared in Posit Cloud () 112 | - Project link will be shared in chat 113 | - Post questions in group chat. 114 | 115 | ## Philosophy 116 | 117 | We share the same philosophy described in 118 | [Section 1.1 of the R Packages book](https://r-pkgs.org/introduction.html#intro-phil) and quote here. 119 | 120 | - "Anything that can be automated, should be automated." 121 | - "Do as little as possible by hand. Do as much as possible with functions." 122 | - "The goal is to spend your time thinking about what you want to do 123 | rather than thinking about the minutiae of package structure." 124 | 125 | # Delivering TLFs in CSR 126 | 127 | ## ICH E3 guidance 128 | 129 | The [ICH E3: structure and content of clinical study reports](https://database.ich.org/sites/default/files/E3_Guideline.pdf) provide guidance to assist sponsors in the development of a CSR. 130 | 131 | In a CSR, most of TLFs are located in 132 | 133 | - Section 10: Study patients 134 | - Section 11: Efficacy evaluation 135 | - Section 12: Safety evaluation 136 | - Section 14: Tables, Figures and Graphs referred to but not included in the text 137 | - Section 16: Appendices 138 | 139 | ## Datasets 140 | 141 | - Public available CDISC pilot [study data located at CDISC GitHub repository](https://github.com/cdisc-org/sdtm-adam-pilot-project/tree/master/updated-pilot-submission-package/900172/m5/datasets/cdiscpilot01/analysis/adam/datasets). 142 | 143 | - The dataset structure follows the [CDISC Analysis Data Model (ADaM)](https://www.cdisc.org/standards/foundational/adam). 144 | 145 | - Source data: 146 | 147 | ## Tools 148 | 149 | - tidyverse: a collection of R packages to simplify the workflow to manipulate, 150 | visualize and analyze data in R. 151 | 152 | - r2rtf: an R package to create production-ready tables and figures in RTF format. 153 | 154 | # r2rtf introduction 155 | 156 | ## Motivation 157 | 158 | In the pharmaceutical industry, RTF/Microsoft Word play a central role 159 | in preparing clinical study reports 160 | 161 | - [ICH E3 Structure and Content of Clinical Study Reports](https://database.ich.org/sites/default/files/E3_Guideline.pdf) 162 | 163 | Different organizations can have different table standards 164 | 165 | - E.g., Table layout, Font size, Border type, Footnote, Data source 166 | 167 | - r2rtf is an R package to create production-ready tables and figures in RTF format. 168 | 169 | r2rtf is designed to: 170 | 171 | - provide simple "verb" functions that correspond to each component of a table, 172 | to help you translate a data frame to a table in RTF format; 173 | - enable pipes (`%>%`); 174 | - only focus on the **table format**. 175 | - Data manipulation and analysis should be handled by other R packages. (e.g., tidyverse) 176 | 177 | ## Workflow 178 | 179 | Before creating an RTF table, we need to: 180 | 181 | - Figure out table layout. 182 | 183 | - Split the layout into small tasks in the form of a computer program. 184 | 185 | - Execute the program. 186 | 187 | ## Minimal example 188 | 189 | r2rtf is designed to enable pipes (`%>%`). 190 | 191 | ```{r, echo = TRUE, eval = FALSE} 192 | head(iris) %>% 193 | rtf_body() %>% # Step 1 Add table attributes 194 | rtf_encode() %>% # Step 2 Convert attributes to RTF encode 195 | write_rtf("minimal.rtf") # Step 3 Write to a .rtf file 196 | ``` 197 | 198 | ```{r, out.width = "100%", out.height = "400px", echo = FALSE, fig.align = "center"} 199 | knitr::include_graphics("minimal.pdf") 200 | ``` 201 | 202 | ## Package overview 203 | 204 | r2rtf package provides the flexibility to customize table appearance for 205 | 206 | - **Table component**: title, column header, footnote, etc. 207 | - **Table cell style**: size, border type, color, font size, text color, alignment, etc. 208 | - **Flexible control**: the specification of the cell style can be row or column vectorized. 209 | - **Complicated format**: pagination, section grouping, multiple table concatenations, etc. 210 | 211 | r2rtf package also provides the flexibility to convert figures in RTF format. 212 | 213 | ## Simple example: adverse events 214 | 215 | r2rtf only focus on **table format**. 216 | Data manipulation and analysis should be handled by other R packages. (e.g., tidyverse) 217 | 218 | - Let's refer to examples in the [Section 1.4.2](https://r4csr.org/tlf-overview.html#r2rtf) 219 | 220 | ## Function summary 221 | 222 | r2rtf provides simple "verb" functions that correspond to each component of a table, 223 | to help you translate data frame to tables in RTF file. 224 | 225 | ```{r, echo = FALSE} 226 | r2rtf_funs <- read.csv("r2rtf-functions.csv") 227 | names(r2rtf_funs)[3] <- "Optional/required" 228 | knitr::kable(r2rtf_funs) 229 | ``` 230 | 231 | ## Function illustration 232 | 233 | ```{r, out.width="100%", echo=FALSE, fig.align="center"} 234 | knitr::include_graphics("function-summary.png") 235 | ``` 236 | 237 | # Break and/or exercise (20 min) 238 | 239 | # CSR examples 240 | 241 | ## Disposition table 242 | 243 | 244 | 245 | ## Analysis population 246 | 247 | 248 | 249 | ## Baseline characteristics 250 | 251 | 252 | 253 | ## Efficacy table 254 | 255 | 256 | 257 | ## AE Summary table 258 | 259 | 260 | 261 | ## Specific AE table 262 | 263 | 264 | 265 | # Break (10 min) 266 | 267 | # Clinical trial project 268 | 269 | ## Overview 270 | 271 | In a late-stage clinical trial, the number of A&R deliverables can easily be in the hundreds. 272 | 273 | For an organization, it is also common to have multiple ongoing clinical trials in a clinical program. 274 | 275 | In this part, let's consider how to organize a clinical trial project as an A&R lead. 276 | 277 | ## Folder structure 278 | 279 | Our primary focus is creating a standard R package structure to organize the 280 | project, with 4 goals in mind: 281 | 282 | - Consistency 283 | - Reproducibility 284 | - Automation 285 | - Compliance 286 | 287 | 288 | 289 | ## Project management 290 | 291 | - Setting up for success 292 | - Teamwork 293 | - Architecture 294 | - Boundaries 295 | - Community 296 | 297 | - The SDLC 298 | - Planning 299 | - Development 300 | - Validation 301 | - Operation 302 | 303 | 304 | 305 | # Break (10 min) 306 | 307 | # eCTD submission 308 | 309 | ## Overview 310 | 311 | 312 | 313 | ## Submission package 314 | 315 | We will discuss strategies to prepare proprietary R packages and analysis code 316 | into proper formats for submission: 317 | 318 | - The whole game 319 | - Practical considerations 320 | - Prepare R packages using `pkglite` 321 | - Prepare analysis programs 322 | - Update ADRG and ARM 323 | 324 | 325 | 326 | ## Running environment 327 | 328 | We will also give recommendations to make the R code 329 | running environment reproducible for dry run tests and reviews 330 | using `cleanslate`. 331 | 332 | 333 | 334 | # pkglite 335 | 336 | ## pkglite: compact package representations 337 | 338 | - To provide a **tool** for packing and restoring R packages as plaintext 339 | assets that are easy to store, transfer, and review. 340 | - To provide a **grammar** for specifying the file packing scope that is 341 | functional, precise, and extendable. 342 | - To provide a **standard** for exchanging the packed asset that is 343 | unambiguous, human-friendly, and machine-readable. 344 | 345 | ## Pipe-friendly workflow 346 | 347 | ```{r, eval=FALSE, echo=TRUE} 348 | library("pkglite") 349 | 350 | "/path/to/pkg/" %>% 351 | collate(file_ectd()) %>% 352 | pack() 353 | 354 | pack( 355 | "/path/to/pkg1/" %>% collate(file_ectd()), 356 | "/path/to/pkg2/" %>% collate(file_ectd()), 357 | output = "/path/to/pkglite.txt" 358 | ) 359 | 360 | "/path/to/pkglite.txt" %>% 361 | unpack(output = "/path/to/output/") 362 | ``` 363 | 364 | ## File specifications + file collections 365 | 366 | File specifications offer flexibility and brevity in specifying the files to include. 367 | 368 | | File specification type | Functions | 369 | |-------------------------|-------------------------------------------------------------------------------------| 370 | | Manual discovery | `file_spec()` | 371 | | Automatic discovery | `file_auto()` | 372 | | Common patterns | `file_root_core()`, `file_r()`, `file_man()`, `file_src()`, `file_vignettes()`, ... | 373 | | Default sets | `file_default()`, `file_ectd()` | 374 | 375 |
376 | 377 | File collections contain the evaluation results of file specifications for packing. 378 | 379 | ```{r, eval=FALSE, echo=TRUE} 380 | library("pkglite") 381 | 382 | "/path/to/pkg" %>% 383 | collate(file_root_core(), file_r(), file_auto("inst/")) 384 | ``` 385 | 386 | ## pkglite.txt 387 | 388 | pkglite.txt follows the standard Debian Control File (DCF) format used by 389 | Debian, R, and RStudio IDE, to be both machine-readable and human-readable. 390 | 391 | ```text 392 | # Generated by pkglite: do not edit by hand 393 | # Use pkglite::unpack() to restore the packages 394 | 395 | Package: pkg1 396 | File: DESCRIPTION 397 | Format: text 398 | Content: 399 | Package: pkg1 400 | Type: Package 401 | Title: Example Package One 402 | Version: 0.1.0 403 | ``` 404 | 405 | # Q&A 406 | -------------------------------------------------------------------------------- /submission-environment.qmd: -------------------------------------------------------------------------------- 1 | # Running environment {#sec-running-environment} 2 | 3 | In the previous chapter, we generated instructions to manually 4 | create the running environments for reproducing the A&R deliverables. 5 | 6 | In this chapter, we focus on automating the creation of 7 | the R environments with R code to accelerate the dry run testing process, 8 | simplifying the ADRG instructions, and making it easy to recreate 9 | different environment settings with reproducible analysis results. 10 | 11 | ## Prerequisites 12 | 13 | cleanslate is an R package that offers a solution to 14 | create portable R environments. 15 | 16 | ::: {.callout-note} 17 | As of Q4 2021, the cleanslate package used in this chapter 18 | is still under active development and validation. 19 | This chapter gives a preview of the planned APIs. 20 | They may change in the future. 21 | ::: 22 | 23 | Install cleanslate from CRAN (once available): 24 | 25 | ```{r, eval=FALSE} 26 | install.packages("cleanslate") 27 | ``` 28 | 29 | Or from GitHub (once available): 30 | 31 | ```{r, eval=FALSE} 32 | remotes::install_github("Merck/cleanslate") 33 | ``` 34 | 35 | ## Practical considerations 36 | 37 | The cleanslate package supports: 38 | 39 | - Creating a project folder with project-specific context 40 | (`.Rproj`, `.Rprofile`, `.Renviron`) 41 | - Installing a specific version of R into the project folder 42 | - Installing a specific version of Rtools into the project folder 43 | 44 | An essential feature of cleanslate is that it does **not** require 45 | administrator privileges to run R and Rtools installers. 46 | This makes it easier to deploy under enterprise settings 47 | and avoids security and portability concerns. 48 | 49 | As many of the A&R deliverables are currently created, validated, and delivered 50 | under Windows, the primary focus is Windows at the moment, 51 | while the support for other platforms might be added in future versions. 52 | 53 | ## Create canonical environments 54 | 55 | One can create a running environment with "canonical" settings with a 56 | single function call to `use_cleanslate()`: 57 | 58 | ```{r, eval=FALSE} 59 | cleanslate::use_cleanslate( 60 | "C:/temp/", 61 | r_version = "4.1.1", 62 | from = "https://cran.r-project.org/", 63 | repo = "https://packagemanager.posit.co/cran/2021-08-06" 64 | ) 65 | ``` 66 | 67 | This will 68 | 69 | - Create a project folder under `C:/temp/` with a `.Rproj` file; 70 | - Download R `4.1.1` installer from CRAN, and install it into `C:/temp/R/`; 71 | - Not install Rtools (by default, `rtools_version = NULL`); 72 | - Create a `.Rprofile` file under the project folder, set `options(repos)` 73 | to use the specified `repo` (a Posit Public Package Manager snapshot in this example), 74 | and give instruction to set the R binary path in RStudio IDE; 75 | - Create a `.Renviron` file under the project folder and set the 76 | library path to be the library of the project-specific R installation. 77 | 78 | As a principle, one should always double-click the `.Rproj` file to 79 | open the project. 80 | This will ensure some sanity checks in the `.Rprofile`, such as whether the 81 | R and library are located within the project folder. 82 | 83 | ## Create tailored environments 84 | 85 | To create a more customized running environment, one can use the specific 86 | functions to tailor each aspect, for example: 87 | 88 | ```{r, eval=FALSE} 89 | library("cleanslate") 90 | 91 | "C:/temp/" %>% 92 | use_project() %>% 93 | use_rprofile() %>% 94 | use_renviron() %>% 95 | use_r_version(version = "4.1.1") %>% 96 | use_rtools(version = "rtools40") 97 | ``` 98 | 99 | The project context functions 100 | (`use_project()`, `use_rprofile()`, `use_renviron`) support custom templates 101 | using [brew](https://cran.r-project.org/package=brew). 102 | 103 | The `use_r_*()` functions have variations that serve as shortcuts 104 | to use R versions defined by release lifecycles, for example, 105 | `use_r_release()`, `use_r_oldrel()`, and `use_r_devel()`. 106 | Note that to ensure better reproducibility, one should still use 107 | `use_r_version()` as the release, oldrel, and devel versions will 108 | shift as time goes by. 109 | 110 | The helper functions `version_*()` and `snapshot_*()` can assist you 111 | in determining specific versions of R and Rtools that are currently available, 112 | besides generating and verifying the snapshot repo links. 113 | 114 | ## Update ADRG 115 | 116 | If you use cleanslate, remember to update the ADRG instructions for 117 | executing the analysis programs in R. Mostly, this can simplify 118 | the first three steps on creating a project, installing a specific 119 | version of R, and configuring the package repo location. 120 | For example: 121 | 122 | ```markdown 123 | Appendix: Instructions to Execute Analysis Program in R 124 | 125 | 1. Setup R environment 126 | 127 | Open the existing R, install the required packages by running the code below. 128 | 129 | install.packages("cleanslate") 130 | 131 | Create a temporary working directory, for example, "C:\tempwork". 132 | Copy all submitted R programs into the temporary folder. 133 | In the same R session, run the code below to create a project 134 | with a portable R environment. 135 | 136 | cleanslate::use_cleanslate( 137 | "C:/temp/", 138 | r_version = "4.1.1", 139 | from = "https://cran.r-project.org/", 140 | repo = "https://packagemanager.posit.co/cran/2021-08-06" 141 | ) 142 | 143 | 2. Open the project 144 | 145 | Go to the working directory created above, double click the .Rproj file 146 | to open the project in RStudio IDE. Follow the instructions to select the 147 | project-specific R version, then restart RStudio IDE. If successful, 148 | the R version and package repo should be printed as defined above. 149 | 150 | 3. Install open-source R packages 151 | 152 | In the new R session, install the required packages by running the code below. 153 | 154 | install.packages(c("pkglite", "publicpkg1", "publicpkg2")) 155 | 156 | 4. Install proprietary R packages 157 | 158 | All internal R packages are packed in the file r0pkgs.txt. In the same R session, 159 | restore the package structures and install them by running the code below. 160 | Adjust the output path as needed to use a writable local directory. 161 | 162 | pkglite::unpack("r0pkgs.txt", output = ".", install = TRUE) 163 | 164 | 5. Update path to dataset and TLFs 165 | 166 | INPUT path: to rerun the analysis programs, define the path variable 167 | 168 | - Path for ADaM data: path$adam 169 | 170 | OUTPUT path: to save the analysis results, define the path variable 171 | 172 | - Path for output TLFs: path$output 173 | 174 | All these paths need to be defined before executing the analysis program. For example: 175 | 176 | path = list(adam = "/path/to/esub/analysis/adam/datasets/") # Modify to use actual location 177 | path$outtable = path$outgraph = "." # Outputs saved to the current folder 178 | 179 | 6. Execute analysis program 180 | 181 | To reproduce the analysis results, rerun the following programs: 182 | 183 | - tlf-01-disposition.txt 184 | - tlf-02-population.txt 185 | - tlf-03-baseline.txt 186 | - tlf-04-efficacy.txt 187 | - tlf-05-ae-summary.txt 188 | - tlf-06-ae-spec.txt 189 | ``` 190 | 191 | ## RStudio addin 192 | 193 | To make it convenient to use cleanslate in experiments, 194 | one can also use its RStudio IDE addin. After cleanslate 195 | is installed, click `Addins` -> `cleanslate` -> `Create portable R environment` 196 | in RStudio IDE, or call `cleanslate:::create_env_addin()` to open it. 197 | 198 | ```{r, out.width="65%", echo=FALSE, fig.cap="cleanslate RStudio addin"} 199 | # Web browser DevTools -> Print as PDF -> 200 | # Edit PDF if necessary -> pdfcrop -> convert to PNG 201 | knitr::include_graphics("images/cleanslate-addin.png") 202 | ``` 203 | 204 | The addin provides a wizard-like interface to help create the environment 205 | with the most important options, yet with less flexibility compared 206 | to the functional API demonstrated above. 207 | -------------------------------------------------------------------------------- /submission-overview.qmd: -------------------------------------------------------------------------------- 1 | # Overview {#submission-overview} 2 | 3 | The electronic Common Technical Document (eCTD) is a standard format for 4 | the electronic submission of applications, amendments, supplements, 5 | and reports from the applicant to the regulator. 6 | The eCTD offers a solution to submit documents stored in a 7 | standard directory structure, with file integrity validation 8 | mechanisms in place. 9 | 10 | To submit TLFs created by R to regulatory agencies, we should follow 11 | the spirit of the existing eCTD submission guidelines to prepare 12 | the deliverables, and provide the essential details in the relevant 13 | documents for review. 14 | 15 | The goal of the following two chapters is to provide guidance to follow 16 | Section 4.1.2.10 of the 17 | [FDA Study Data Technical Conformance Guide](https://www.fda.gov/media/88173/download): 18 | 19 | > Sponsors should provide the software programs used to create all ADaM 20 | > datasets and **generate tables and figures associated with primary and 21 | > secondary efficacy analyses**. Furthermore, sponsors should submit software 22 | > programs used to generate additional information included in Section 14 23 | > CLINICAL STUDIES of the Prescribing Information (PI)26 if applicable. 24 | > **The specific software utilized should be specified in the ADRG**. 25 | > The main purpose of requesting the submission of these programs 26 | > **is to understand the process by which the variables for the respective 27 | > analyses were created and to confirm the analysis algorithms**. 28 | > Sponsors should submit software programs in **ASCII text format**; 29 | > however, executable file extensions should not be used. 30 | 31 | @sec-submission-package will focus on preparing 32 | proprietary R packages and analysis code into proper 33 | formats for submission. 34 | 35 | @sec-running-environment will discuss 36 | the recommendations to make the R code running environment 37 | reproducible for dry run tests and reviews. 38 | -------------------------------------------------------------------------------- /tex/after_body.tex: -------------------------------------------------------------------------------- 1 | \backmatter 2 | 3 | \let\hyperlink=\oldhyperlink % Restore old hyperlink behaviour 4 | \cleardoublepage 5 | \markboth{Index}{Index} 6 | \addcontentsline{toc}{chapter}{Index} 7 | \printindex 8 | 9 | \addcontentsline{toc}{chapter}{Code index} 10 | \printindex[code] 11 | -------------------------------------------------------------------------------- /tex/before_body.tex: -------------------------------------------------------------------------------- 1 | \null\vfill 2 | \begin{flushleft} 3 | \thispagestyle{empty} 4 | \textit{R for Clinical Study Reports and Submission} 5 | 6 | © Placeholder Name, Inc. 7 | 8 | ISBN-1234567891234 9 | 10 | \noindent Lorem ipsum dolor sit amet, consectetur adipiscing elit. 11 | Nulla et elementum libero. In hac habitasse platea dictumst. 12 | Vestibulum ante ipsum primis in faucibus orci luctus et ultrices 13 | posuere cubilia Curae; Donec sed odio dui. Nullam quis risus eget 14 | urna mollis ornare vel eu leo. Pellentesque habitant morbi tristique 15 | senectus et netus et malesuada fames ac turpis egestas. 16 | Curabitur blandit tempus porttitor. 17 | Integer posuere erat a ante venenatis dapibus posuere velit aliquet. 18 | \end{flushleft} 19 | 20 | \frontmatter 21 | 22 | % Dedication 23 | \begin{center} 24 | \thispagestyle{empty} 25 | \vspace*{\fill} 26 | \huge{\textit{Placeholder for dedication text}} 27 | \vspace*{\fill} 28 | \end{center} 29 | 30 | \mainmatter 31 | -------------------------------------------------------------------------------- /tex/preamble.tex: -------------------------------------------------------------------------------- 1 | \usepackage{booktabs} 2 | 3 | \usepackage{float} 4 | \usepackage{index} 5 | % index functions separately 6 | \newindex{code}{adx}{and}{R code index} 7 | \newcommand{\indexf}[1]{\index[code]{#1@\texttt{#1()}}} 8 | \newcommand{\indexc}[1]{\index[code]{#1@\texttt{#1}}} 9 | 10 | \DeclareGraphicsExtensions{.pdf,.png} 11 | 12 | \usepackage{hyperref} 13 | % Place links in parens 14 | \renewcommand{\href}[2]{#2 (\url{#1})} 15 | % Use auto ref for internal links 16 | \let\oldhyperlink=\hyperlink 17 | \renewcommand{\hyperlink}[2]{\autoref{#1}} 18 | \def\chapterautorefname{Chapter} 19 | \def\sectionautorefname{Section} 20 | \def\subsectionautorefname{Section} 21 | \def\subsubsectionautorefname{Section} 22 | 23 | \setlength{\emergencystretch}{3em} % prevent overfull lines 24 | \vbadness=10000 % suppress underfull \vbox 25 | \hbadness=10000 % suppress underfull \vbox 26 | \hfuzz=10pt 27 | 28 | \makeindex 29 | -------------------------------------------------------------------------------- /tex/svind.ist: -------------------------------------------------------------------------------- 1 | headings_flag 1 2 | heading_prefix "{\\bf " 3 | heading_suffix "}\\nopagebreak%\n \\indexspace\\nopagebreak%" 4 | delim_0 "\\idxquad " 5 | delim_1 "\\idxquad " 6 | delim_2 "\\idxquad " 7 | delim_n ",\\," 8 | -------------------------------------------------------------------------------- /tlf-ae-specific.qmd: -------------------------------------------------------------------------------- 1 | # Specific AE 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | Following [ICH E3 guidance](https://database.ich.org/sites/default/files/E3_Guideline.pdf), 8 | we need to summarize number of participants for each specific AE in Section 12.2, Adverse Events (AEs). 9 | 10 | ```{r} 11 | library(haven) # Read SAS data 12 | library(dplyr) # Manipulate data 13 | library(tidyr) # Manipulate data 14 | library(r2rtf) # Reporting in RTF format 15 | ``` 16 | 17 | In this chapter, we illustrate how to summarize simplified specific AE 18 | information for a study. 19 | 20 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 21 | knitr::include_graphics("tlf/tlf_spec_ae.pdf") 22 | ``` 23 | 24 | The data used to summarize AE information is in `adsl` and `adae` datasets. 25 | 26 | ```{r} 27 | adsl <- read_sas("data-adam/adsl.sas7bdat") 28 | adae <- read_sas("data-adam/adae.sas7bdat") 29 | ``` 30 | 31 | For illustration purpose, we only provide counts in the simplified 32 | table. The percentage of participants for each AE can be 33 | calculated as shown in @sec-aesummary. 34 | 35 | Here, we focus on the analysis script for two advanced 36 | features for a table layout. 37 | 38 | - group content: AE can be summarized in multiple nested layers. 39 | (e.g., by system organ class (SOC, `AESOC`) and specific AE term 40 | (`AEDECOD`)) 41 | - pagenization: there are many AE terms that can not be covered in one 42 | page. Column headers and SOC information need to be repeated on 43 | every page. 44 | 45 | In the code below, we count the number of participants in each AE term by 46 | SOC and treatment arm, and we create a new variable `order` and set it 47 | as `0`. The variable `order` can help with 48 | the data manipulation later. 49 | 50 | ```{r} 51 | fmt_num <- function(x, digits, width = digits + 4) { 52 | formatC( 53 | x, 54 | digits = digits, 55 | format = "f", 56 | width = width 57 | ) 58 | } 59 | ``` 60 | 61 | ```{r} 62 | ana <- adae %>% 63 | mutate( 64 | AESOC = tools::toTitleCase(tolower(AESOC)), 65 | AEDECOD = tools::toTitleCase(tolower(AEDECOD)) 66 | ) 67 | 68 | t1 <- ana %>% 69 | group_by(TRTAN, AESOC) %>% 70 | summarise(n = fmt_num(n_distinct(USUBJID), digits = 0)) %>% 71 | mutate(AEDECOD = AESOC, order = 0) 72 | 73 | t1 74 | ``` 75 | 76 | In the code below, we count the number of subjects in each AE term by 77 | SOC, AE term, and treatment arm. Here we also create a new variable 78 | `order` and set it as `1`. 79 | 80 | ```{r} 81 | t2 <- ana %>% 82 | group_by(TRTAN, AESOC, AEDECOD) %>% 83 | summarise(n = fmt_num(n_distinct(USUBJID), digits = 0)) %>% 84 | mutate(order = 1) 85 | 86 | t2 87 | ``` 88 | 89 | We prepare reporting data for AE information using code below: 90 | 91 | ```{r} 92 | t_ae <- bind_rows(t1, t2) %>% 93 | pivot_wider( 94 | id_cols = c(AESOC, order, AEDECOD), 95 | names_from = TRTAN, 96 | names_prefix = "n_", 97 | values_from = n, 98 | values_fill = fmt_num(0, digits = 0) 99 | ) %>% 100 | arrange(AESOC, order, AEDECOD) %>% 101 | select(AESOC, AEDECOD, starts_with("n")) 102 | 103 | t_ae 104 | ``` 105 | 106 | We prepare reporting data for analysis population using code below: 107 | 108 | ```{r} 109 | count_by <- function(data, # Input data set 110 | grp, # Group variable 111 | var, # Analysis variable 112 | var_label = var, # Analysis variable label 113 | id = "USUBJID") { # Subject ID variable 114 | data <- data %>% rename(grp = !!grp, var = !!var, id = !!id) 115 | 116 | left_join( 117 | count(data, grp, var), 118 | count(data, grp, name = "tot"), 119 | by = "grp", 120 | ) %>% 121 | mutate( 122 | pct = fmt_num(100 * n / tot, digits = 1), 123 | n = fmt_num(n, digits = 0), 124 | npct = paste0(n, " (", pct, ")") 125 | ) %>% 126 | pivot_wider( 127 | id_cols = var, 128 | names_from = grp, 129 | values_from = c(n, pct, npct), 130 | values_fill = list(n = "0", pct = fmt_num(0, digits = 0)) 131 | ) %>% 132 | mutate(var_label = var_label) 133 | } 134 | ``` 135 | 136 | ```{r} 137 | t_pop <- adsl %>% 138 | filter(SAFFL == "Y") %>% 139 | count_by("TRT01AN", "SAFFL", 140 | var_label = "Participants in population" 141 | ) %>% 142 | mutate( 143 | AESOC = "pop", 144 | AEDECOD = var_label 145 | ) %>% 146 | select(AESOC, AEDECOD, starts_with("n_")) 147 | 148 | t_pop 149 | ``` 150 | 151 | The final report data is saved in `tbl_ae_spec`. 152 | We also add a blank row between population and AE information in the reporting table. 153 | 154 | ```{r} 155 | tbl_ae_spec <- bind_rows( 156 | t_pop, 157 | data.frame(AESOC = "pop"), 158 | t_ae 159 | ) %>% 160 | mutate(AEDECOD = ifelse(AEDECOD == AESOC, 161 | AEDECOD, paste0(" ", AEDECOD) 162 | )) 163 | 164 | tbl_ae_spec 165 | ``` 166 | 167 | We define the format of the output as below: 168 | 169 | To obtain the nested layout, we use the `page_by` argument in the 170 | `rtf_body` function. By defining `page_by="AESOC"`, r2rtf recognizes 171 | the variable as a group indicator. 172 | 173 | After setting `pageby_row = "first_row"`, the first row is displayed as 174 | group header. If a group of information is broken into multiple pages, 175 | the group header row is repeated on each page by default. 176 | 177 | We can also customize the text format by providing a matrix that has the 178 | same dimension as the input dataset (i.e., `tbl_ae_spec`). In the code 179 | below, we illustrate how to display **bold** text for group headers to 180 | highlight the nested structure of the table layout. 181 | 182 | ```{r} 183 | n_row <- nrow(tbl_ae_spec) 184 | n_col <- ncol(tbl_ae_spec) 185 | id <- tbl_ae_spec$AESOC == tbl_ae_spec$AEDECOD 186 | id <- ifelse(is.na(id), FALSE, id) 187 | 188 | text_format <- ifelse(id, "b", "") 189 | ``` 190 | 191 | ```{r} 192 | tbl_ae_spec %>% 193 | rtf_title( 194 | "Analysis of Participants With Specific Adverse Events", 195 | "(Safety Analysis Population)" 196 | ) %>% 197 | rtf_colheader(" | Placebo | Xanomeline Low Dose| Xanomeline High Dose", 198 | col_rel_width = c(3, rep(1, 3)) 199 | ) %>% 200 | rtf_colheader(" | n | n | n ", 201 | border_top = "", 202 | border_bottom = "single", 203 | col_rel_width = c(3, rep(1, 3)) 204 | ) %>% 205 | rtf_body( 206 | col_rel_width = c(1, 3, rep(1, 3)), 207 | text_justification = c("l", "l", rep("c", 3)), 208 | text_format = matrix(text_format, nrow = n_row, ncol = n_col), 209 | page_by = "AESOC", 210 | pageby_row = "first_row" 211 | ) %>% 212 | rtf_footnote("Every subject is counted a single time for each applicable row and column.") %>% 213 | rtf_encode() %>% 214 | write_rtf("tlf/tlf_spec_ae.rtf") 215 | ``` 216 | 217 | ```{r, include=FALSE} 218 | rtf2pdf("tlf/tlf_spec_ae.rtf") 219 | ``` 220 | 221 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 222 | knitr::include_graphics("tlf/tlf_spec_ae.pdf") 223 | ``` 224 | 225 | More discussion on `page_by`, `group_by` and `subline_by` 226 | features can be found on the 227 | [r2rtf package website](https://merck.github.io/r2rtf/articles/example-sublineby-pageby-groupby.html). 228 | 229 | The procedure to generate a baseline characteristics table can be 230 | summarized as follows: 231 | 232 | - Step 1: Read data (i.e., `adae` and `adsl`) into R. 233 | - Step 2: Count the number of participants by SOC and treatment arm 234 | (rows with bold text) and save into `t1`. 235 | - Step 3: Count the number of participants in each AE term by SOC, AE 236 | term, and treatment arm (rows without bold text) and save into `t2`. 237 | - Step 4: Bind `t1` and `t2` by row into `t_ae`. 238 | - Step 5: Count the number of participants in each arm as `t_pop`. 239 | - Step 6: Row-wise combine `t_pop` and `t_ae` into `tbl_ae_spec`. 240 | - Step 7: Format the output by using r2rtf. 241 | -------------------------------------------------------------------------------- /tlf-ae-summary.qmd: -------------------------------------------------------------------------------- 1 | # AE summary {#sec-aesummary} 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | Following [ICH E3 guidance](https://database.ich.org/sites/default/files/E3_Guideline.pdf), 8 | we summarize number of participants that were included in each safety analysis in Section 12.2, Adverse Events (AEs). 9 | 10 | ```{r} 11 | library(haven) # Read SAS data 12 | library(dplyr) # Manipulate data 13 | library(tidyr) # Manipulate data 14 | library(r2rtf) # Reporting in RTF format 15 | ``` 16 | 17 | In this chapter, we illustrate how to summarize AEs information for a study. 18 | 19 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 20 | knitr::include_graphics("tlf/tlf_ae_summary.pdf") 21 | ``` 22 | 23 | The data used to summarize AE information is in `adsl` and `adae` datasets. 24 | 25 | ```{r} 26 | adsl <- read_sas("data-adam/adsl.sas7bdat") 27 | adae <- read_sas("data-adam/adae.sas7bdat") 28 | ``` 29 | 30 | We first summarize participants in population by treatment arm. 31 | 32 | ```{r} 33 | pop <- adsl %>% 34 | filter(SAFFL == "Y") %>% 35 | rename(TRTAN = TRT01AN) %>% 36 | count(TRTAN, name = "tot") 37 | 38 | pop 39 | ``` 40 | 41 | We transform the data to simplify the analysis of each required AE criteria of interest. 42 | 43 | - With one or more adverse events 44 | - With drug-related adverse events 45 | - With serious adverse events 46 | - With serious drug-related adverse events 47 | - Who died 48 | 49 | ```{r} 50 | tidy_ae <- adae %>% 51 | mutate( 52 | all = SAFFL == "Y", 53 | drug = AEREL %in% c("POSSIBLE", "PROBABLE"), 54 | ser = AESER == "Y", 55 | drug_ser = drug & ser, 56 | die = AEOUT == "FATAL" 57 | ) %>% 58 | select(USUBJID, TRTAN, all, drug, ser, drug_ser, die) %>% 59 | pivot_longer(cols = c(all, drug, ser, drug_ser, die)) 60 | 61 | tidy_ae 62 | ``` 63 | 64 | We summarize the number and percentage of participants who meet each AE criteria. 65 | 66 | ```{r} 67 | fmt_num <- function(x, digits, width = digits + 4) { 68 | formatC( 69 | x, 70 | digits = digits, 71 | format = "f", 72 | width = width 73 | ) 74 | } 75 | ``` 76 | 77 | ```{r} 78 | ana <- tidy_ae %>% 79 | filter(value == TRUE) %>% 80 | group_by(TRTAN, name) %>% 81 | summarise(n = n_distinct(USUBJID)) %>% 82 | left_join(pop, by = "TRTAN") %>% 83 | mutate( 84 | pct = fmt_num(n / tot * 100, digits = 1), 85 | n = fmt_num(n, digits = 0), 86 | pct = paste0("(", pct, ")") 87 | ) 88 | 89 | ana 90 | ``` 91 | 92 | We prepare reporting-ready dataset for each AE group. 93 | 94 | ```{r} 95 | t_ae <- ana %>% 96 | pivot_wider( 97 | id_cols = "name", 98 | names_from = TRTAN, 99 | values_from = c(n, pct), 100 | values_fill = list( 101 | n = " 0", 102 | pct = "( 0.0)" 103 | ) 104 | ) 105 | 106 | t_ae <- t_ae %>% 107 | mutate(name = factor( 108 | name, 109 | c("all", "drug", "ser", "drug_ser", "die"), 110 | c( 111 | "With one or more adverse events", 112 | "With drug-related adverse events", 113 | "With serious adverse events", 114 | "With serious drug-related adverse events", 115 | "Who died" 116 | ) 117 | )) %>% 118 | arrange(name) 119 | ``` 120 | 121 | We prepare reporting-ready dataset for the analysis population. 122 | 123 | ```{r} 124 | t_pop <- pop %>% 125 | mutate( 126 | name = "Participants in population", 127 | tot = fmt_num(tot, digits = 0) 128 | ) %>% 129 | pivot_wider( 130 | id_cols = name, 131 | names_from = TRTAN, 132 | names_prefix = "n_", 133 | values_from = tot 134 | ) 135 | 136 | t_pop 137 | ``` 138 | 139 | The final report data is saved in `tbl_ae_summary`. 140 | 141 | ```{r} 142 | tbl_ae_summary <- bind_rows(t_pop, t_ae) %>% 143 | select(name, ends_with("_0"), ends_with("_54"), ends_with("_81")) 144 | 145 | tbl_ae_summary 146 | ``` 147 | 148 | We define the format of the output using code below: 149 | 150 | ```{r} 151 | tbl_ae_summary %>% 152 | rtf_title( 153 | "Analysis of Adverse Event Summary", 154 | "(Safety Analysis Population)" 155 | ) %>% 156 | rtf_colheader(" | Placebo | Xanomeline Low Dose| Xanomeline High Dose", 157 | col_rel_width = c(3.5, rep(2, 3)) 158 | ) %>% 159 | rtf_colheader(" | n | (%) | n | (%) | n | (%)", 160 | col_rel_width = c(3.5, rep(c(0.7, 1.3), 3)), 161 | border_top = c("", rep("single", 6)), 162 | border_left = c("single", rep(c("single", ""), 3)) 163 | ) %>% 164 | rtf_body( 165 | col_rel_width = c(3.5, rep(c(0.7, 1.3), 3)), 166 | text_justification = c("l", rep("c", 6)), 167 | border_left = c("single", rep(c("single", ""), 3)) 168 | ) %>% 169 | rtf_footnote("Every subject is counted a single time for each applicable row and column.") %>% 170 | rtf_encode() %>% 171 | write_rtf("tlf/tlf_ae_summary.rtf") 172 | ``` 173 | 174 | ```{r, include=FALSE} 175 | rtf2pdf("tlf/tlf_ae_summary.rtf") 176 | ``` 177 | 178 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 179 | knitr::include_graphics("tlf/tlf_ae_summary.pdf") 180 | ``` 181 | 182 | The procedure to generate an AE summary table can be summarized as follows: 183 | 184 | - Step 1: Read data (i.e., `adae` and `adsl`) into R. 185 | - Step 2: Summarize participants in population by treatment arm, and name the dataset as `t_pop`. 186 | - Step 3: Summarize participants in population by required AE criteria of interest, 187 | and name the dataset as `t_ae`. 188 | - Step 4: Row-wise combine `t_pop` and `t_ae` and format it by using r2rtf. 189 | -------------------------------------------------------------------------------- /tlf-assemble.qmd: -------------------------------------------------------------------------------- 1 | # Assemble TLFs {#assemble} 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | ```{r} 8 | library(r2rtf) 9 | ``` 10 | 11 | After TLFs are created and saved into individual files, 12 | we need to assemble them into one file in a pre-specified order. 13 | 14 | There are two general approaches to achieving the goal. 15 | 16 | 1. Combine RTF source code in individual files into one large RTF file. 17 | 1. Leverage the `Toggle Fields` feature in Microsoft Word to embed RTF files using 18 | hyperlinks. 19 | 20 | Let's illustrate the idea by using selected TLFs generated from previous chapters. 21 | Here, we assume files are saved in the `tlf/` folder. 22 | 23 | ```{r} 24 | tlf_path <- c( 25 | "tlf/tbl_disp.rtf", # Disposition table 26 | "tlf/tlf_eff.rtf", # Efficacy table 27 | "tlf/tlf_km.rtf" # K-M plot 28 | ) 29 | ``` 30 | 31 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 32 | knitr::include_graphics("tlf/rtf-combine.pdf") 33 | ``` 34 | 35 | ## Combine RTF Source Code 36 | 37 | ::: {.callout-note} 38 | The code below requires r2rtf version >= 1.0.0. 39 | ::: 40 | 41 | The `r2rtf::assemble_rtf()` function allows the user to combine RTF 42 | source code in individual files into one larger RTF file. 43 | 44 | ::: {.callout-caution} 45 | One limitation of combining RTF source code is that 46 | we are not able to specify the page orientation of each TLF 47 | in the combined document. 48 | ::: 49 | 50 | ```{r} 51 | r2rtf::assemble_rtf( 52 | input = tlf_path, 53 | output = "tlf/rtf-combine.rtf" 54 | ) 55 | ``` 56 | 57 | ## Using Toggle Fields 58 | 59 | Microsoft Word uses toggle fields to embed files into one Word document. 60 | The approach is a dynamic link between files by providing the absolute file path. 61 | 62 | ::: {.callout-tip} 63 | There is a slight learning curve on how toggle fields work 64 | in Microsoft Word. 65 | After you become familiar with the workflow, 66 | toggle fields can extend your capability to manage a large number of TLFs 67 | in RTF format. 68 | ::: 69 | 70 | The `assemble_docx()` function 71 | allows you to create a `.docx` file with toggle fields as below. 72 | One benefit is to control the page direction of each TLF as below. 73 | 74 | ```{r} 75 | r2rtf::assemble_docx( 76 | tlf_path, 77 | output = "tlf/rtf-combine-toggle.docx", 78 | landscape = c(FALSE, FALSE, TRUE) 79 | ) 80 | ``` 81 | 82 | After opening the generated `.docx` file, 83 | you will see a blank file because the file only contains fields 84 | with hyperlinks. 85 | 86 | By using Alt + F9 to display the fields and you will 87 | see information similar to the screenshot below. 88 | 89 | ```{r, echo=FALSE, out.width="99%", fig.cap="Using Alt + F9 to display fields", fig.align="center"} 90 | knitr::include_graphics("images/rtf-alt-f9.png") 91 | ``` 92 | 93 | ::: {.callout-tip} 94 | A typical error message is that system can not find the file 95 | if you only provide a relative path. 96 | Please double-check that the correct absolute file path is in the `INCLUDETEXT` field. 97 | ::: 98 | 99 | To test the toggle field, you can right-click an `INCLUDETEXT` filed and 100 | click `Update Field`. 101 | 102 | If it works, you can see a table similar to the snapshot below 103 | by using Alt + F9. 104 | It is a shortcut to change between results and field display mode. 105 | 106 | ```{r, echo=FALSE, out.width="99%", fig.cap="Update fields", fig.align="center"} 107 | knitr::include_graphics("images/rtf-after-update.png") 108 | ``` 109 | 110 | Now you can update all toggle fields to display all TLFs by 111 | selecting all fields (Ctrl + A), then press F9. 112 | We suggest testing one toggle field before updating all of them. 113 | 114 | As the `.docx` file contain dynamic links, 115 | you can keep updating the TLFs if you need to refresh content in 116 | individual RTF files by selecting all fields (Ctrl + A), then press F9. 117 | 118 | ::: {.callout-tip} 119 | If you modify table content in the combined `.docx` file, 120 | you may get a weird table layout if you update all fields within a toggle field. 121 | To resolve the issue, please remove all `\* MERGEFORMAT` in the filed mode using Alt + F9 before updating all toggle fields. 122 | ::: 123 | 124 | After the combined TLF is ready for delivery, 125 | you can also unlink toggle fields to save table contents, 126 | because the absolute path may only work for some. 127 | To unlink toggle fields, you can select all fields (Ctrl + A), 128 | then press Ctrl + Shift + F9. 129 | -------------------------------------------------------------------------------- /tlf-baseline.qmd: -------------------------------------------------------------------------------- 1 | # Baseline characteristics 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | Following [ICH E3 guidance](https://database.ich.org/sites/default/files/E3_Guideline.pdf), 8 | we need to summarize critical demographic and baseline characteristics of the participants 9 | in Section 11.2, Demographic and Other Baseline Characteristics. 10 | 11 | In this chapter, we illustrate how to create a simplified 12 | baseline characteristics table for a study. 13 | 14 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 15 | knitr::include_graphics("tlf/tlf_base.pdf") 16 | ``` 17 | 18 | There are many R packages that can efficiently summarize baseline information. 19 | The [table1](https://github.com/benjaminrich/table1) R package is one of them. 20 | 21 | ```{r} 22 | library(table1) 23 | library(r2rtf) 24 | library(haven) 25 | library(dplyr) 26 | library(tidyr) 27 | library(stringr) 28 | library(tools) 29 | ``` 30 | 31 | As in previous chapters, we first read the `adsl` dataset that contains all 32 | the required information for the baseline characteristics table. 33 | 34 | ```{r} 35 | adsl <- read_sas("data-adam/adsl.sas7bdat") 36 | ``` 37 | 38 | For simplicity, we only analyze `SEX`, `AGE` and, `RACE` in this example 39 | using the table1 R package. More details of the table1 R package can 40 | be found in the package 41 | [vignettes](https://benjaminrich.github.io/table1/vignettes/table1-examples.html). 42 | 43 | The table1 R package directly creates an HTML report. 44 | 45 | ```{r} 46 | ana <- adsl %>% 47 | mutate( 48 | SEX = factor(SEX, c("F", "M"), c("Female", "Male")), 49 | RACE = toTitleCase(tolower(RACE)) 50 | ) 51 | 52 | tbl <- table1(~ SEX + AGE + RACE | TRT01P, data = ana) 53 | tbl 54 | ``` 55 | 56 | The code below transfer the output into a dataframe 57 | that only contains ASCII characters 58 | recommended by regulatory agencies. 59 | `tbl_base` is used as input for r2rtf to create the final report. 60 | 61 | ```{r} 62 | tbl_base <- tbl %>% 63 | as.data.frame() %>% 64 | as_tibble() %>% 65 | mutate(across( 66 | everything(), 67 | ~ str_replace_all(.x, intToUtf8(160), " ") 68 | )) 69 | 70 | 71 | names(tbl_base) <- str_replace_all(names(tbl_base), intToUtf8(160), " ") 72 | tbl_base 73 | ``` 74 | 75 | We define the format of the output. We highlight items that 76 | are not discussed in previous discussion. 77 | 78 | `text_indent_first` and `text_indent_left` are used to control the indent 79 | space of text. They are helpful when you need to control the white space 80 | of a long phrase, "AMERICAN INDIAN OR ALASKA NATIVE" 81 | in the table provides an example. 82 | 83 | ```{r} 84 | colheader1 <- paste(names(tbl_base), collapse = "|") 85 | colheader2 <- paste(tbl_base[1, ], collapse = "|") 86 | rel_width <- c(2.5, rep(1, 4)) 87 | 88 | tbl_base[-1, ] %>% 89 | rtf_title( 90 | "Baseline Characteristics of Participants", 91 | "(All Participants Randomized)" 92 | ) %>% 93 | rtf_colheader(colheader1, 94 | col_rel_width = rel_width 95 | ) %>% 96 | rtf_colheader(colheader2, 97 | border_top = "", 98 | col_rel_width = rel_width 99 | ) %>% 100 | rtf_body( 101 | col_rel_width = rel_width, 102 | text_justification = c("l", rep("c", 4)), 103 | text_indent_first = -240, 104 | text_indent_left = 180 105 | ) %>% 106 | rtf_encode() %>% 107 | write_rtf("tlf/tlf_base.rtf") 108 | ``` 109 | 110 | ```{r, include=FALSE} 111 | rtf2pdf("tlf/tlf_base.rtf") 112 | ``` 113 | 114 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 115 | knitr::include_graphics("tlf/tlf_base.pdf") 116 | ``` 117 | 118 | In conclusion, the procedure to generate demographic and baseline characteristics table is summarized as follows: 119 | 120 | - Step 1: Read the data set. 121 | - Step 2: Use `table1::table1()` to get the baseline characteristics table. 122 | - Step 3: Transfer the output from Step 2 into a data frame that only contains ASCII characters. 123 | - Step 4: Define the format of the RTF table by using the R package r2rtf. 124 | -------------------------------------------------------------------------------- /tlf-disposition.qmd: -------------------------------------------------------------------------------- 1 | # Disposition {#sec-disposition} 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | Following [ICH E3 guidance](https://database.ich.org/sites/default/files/E3_Guideline.pdf), 8 | a summary table needs to be provided to include all participants who entered the study in Section 10.1, Disposition of Participants. 9 | 10 | The disposition of participants table reports the numbers of participants who were randomized, 11 | and who entered and completed each phase of the study. 12 | In addition, the reasons for all post-randomization discontinuations, 13 | grouped by treatment and by major reason (lost to follow-up, adverse event, poor compliance, etc.) are reported. 14 | 15 | ```{r} 16 | library(haven) # Read SAS data 17 | library(dplyr) # Manipulate data 18 | library(tidyr) # Manipulate data 19 | library(r2rtf) # Reporting in RTF format 20 | ``` 21 | 22 | In this chapter, we show how to create a typical disposition table. 23 | 24 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 25 | knitr::include_graphics("tlf/tbl_disp.pdf") 26 | ``` 27 | 28 | The first step is to read in the relevant datasets into R. 29 | For a disposition table, all the required information is saved in a Subject-level Analysis Dataset (ADSL). 30 | This dataset is provided in `sas7bdat` format, which is a SAS data format currently used in many clinical trial analysis and reporting. 31 | The `haven` package is able to read the dataset, while maintaining its attributes (e.g., variable labels). 32 | 33 | ```{r} 34 | adsl <- read_sas("data-adam/adsl.sas7bdat") 35 | ``` 36 | 37 | The following variables are used in the preparation of a simplified disposition of participants table: 38 | 39 | - USUBJID: unique subject identifier 40 | - TRT01P: planned treatment 41 | - TRT01PN: planned treatment numeric encoding 42 | - DISCONFL: discontinued from study flag 43 | - DCREASCD: discontinued from study reason coded 44 | 45 | ```{r} 46 | adsl %>% select(USUBJID, TRT01P, TRT01PN, DISCONFL, DCREASCD) 47 | ``` 48 | 49 | In the code below, we calculate the number of participants in the analysis population by treatment arms. 50 | 51 | ```{r} 52 | n_rand <- adsl %>% 53 | group_by(TRT01PN) %>% 54 | summarize(n = n()) %>% 55 | pivot_wider( 56 | names_from = TRT01PN, 57 | names_prefix = "n_", 58 | values_from = n 59 | ) %>% 60 | mutate(row = "Participants in population") 61 | 62 | n_rand 63 | ``` 64 | 65 | ```{r} 66 | n_disc <- adsl %>% 67 | group_by(TRT01PN) %>% 68 | summarize( 69 | n = sum(DISCONFL == "Y"), 70 | pct = formatC(n / n() * 100, 71 | digits = 1, format = "f", width = 5 72 | ) 73 | ) %>% 74 | pivot_wider( 75 | names_from = TRT01PN, 76 | values_from = c(n, pct) 77 | ) %>% 78 | mutate(row = "Discontinued") 79 | 80 | n_disc 81 | ``` 82 | 83 | In the code below, we calculate the number and percentage of 84 | participants who completed/discontinued the study for different reasons by treatment arms. 85 | 86 | ```{r} 87 | n_reason <- adsl %>% 88 | group_by(TRT01PN) %>% 89 | mutate(n_total = n()) %>% 90 | group_by(TRT01PN, DCREASCD) %>% 91 | summarize( 92 | n = n(), 93 | pct = formatC(n / unique(n_total) * 100, 94 | digits = 1, format = "f", width = 5 95 | ) 96 | ) %>% 97 | pivot_wider( 98 | id_cols = DCREASCD, 99 | names_from = TRT01PN, 100 | values_from = c(n, pct), 101 | values_fill = list(n = 0, pct = " 0.0") 102 | ) %>% 103 | rename(row = DCREASCD) 104 | 105 | n_reason 106 | ``` 107 | 108 | In the code below, we calculate the number and percentage of participants who complete the study by treatment arms. 109 | We split `n_reason` because we want to customize the row order of the table. 110 | 111 | ```{r} 112 | n_complete <- n_reason %>% 113 | filter(row == "Completed") 114 | 115 | n_complete 116 | ``` 117 | 118 | In the code below, we calculate the numbers and percentages of participants who discontinued the study for different reasons by treatment arms. 119 | For display purpose, `paste0(" ", row)` is used to add leading spaces to produce indentation in the final report. 120 | 121 | ```{r} 122 | n_reason <- n_reason %>% 123 | filter(row != "Completed") %>% 124 | mutate(row = paste0(" ", row)) 125 | 126 | n_reason 127 | ``` 128 | 129 | Now we combine individual rows into one table for reporting purpose. 130 | `tbl_disp` is used as input for r2rtf to create final report. 131 | 132 | ```{r} 133 | tbl_disp <- bind_rows(n_rand, n_complete, n_disc, n_reason) %>% 134 | select(row, ends_with(c("_0", "_54", "_81"))) 135 | 136 | tbl_disp 137 | ``` 138 | 139 | In the below code, formatting of the final table is defined. 140 | Items that were not discussed in the previous sections, are highlighted below. 141 | 142 | The `rtf_title` defines table title. 143 | We can provide a vector for the title argument. 144 | Each value is a separate line. 145 | The format can also be controlled by providing a vector input in text format. 146 | 147 | ```{r} 148 | tbl_disp %>% 149 | # Table title 150 | rtf_title("Disposition of Participants") %>% 151 | # First row of column header 152 | rtf_colheader(" | Placebo | Xanomeline Low Dose| Xanomeline High Dose", 153 | col_rel_width = c(3, rep(2, 3)) 154 | ) %>% 155 | # Second row of column header 156 | rtf_colheader(" | n | (%) | n | (%) | n | (%)", 157 | col_rel_width = c(3, rep(c(0.7, 1.3), 3)), 158 | border_top = c("", rep("single", 6)), 159 | border_left = c("single", rep(c("single", ""), 3)) 160 | ) %>% 161 | # Table body 162 | rtf_body( 163 | col_rel_width = c(3, rep(c(0.7, 1.3), 3)), 164 | text_justification = c("l", rep("c", 6)), 165 | border_left = c("single", rep(c("single", ""), 3)) 166 | ) %>% 167 | # Encoding RTF syntax 168 | rtf_encode() %>% 169 | # Save to a file 170 | write_rtf("tlf/tbl_disp.rtf") 171 | ``` 172 | 173 | ```{r, include=FALSE} 174 | rtf2pdf("tlf/tbl_disp.rtf") 175 | ``` 176 | 177 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 178 | knitr::include_graphics("tlf/tbl_disp.pdf") 179 | ``` 180 | 181 | The procedure to generate a disposition table can be summarized as follows: 182 | 183 | - Step 1: Read subject level data (i.e., `adsl`) into R. 184 | - Step 2: Count participants in the analysis population and name the dataset `n_rand`. 185 | - Step 3: Calculate the number and percentage of participants who discontinued the study by treatment arm, and name the dataset `n_disc`. 186 | - Step 4: Calculate the numbers and percentages of participants who discontinued the study for different reasons by treatment arm, 187 | and name the dataset `n_reason`. 188 | - Step 5: Calculate the number and percentage of participants who completed the study by treatment arm, and name the dataset `n_complete`. 189 | - Step 6: Bind `n_rand`, `n_disc`, `n_reason`, and `n_complete` by row. 190 | - Step 7: Write the final table to RTF 191 | -------------------------------------------------------------------------------- /tlf-efficacy-ancova.qmd: -------------------------------------------------------------------------------- 1 | # Efficacy table 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | Following [ICH E3 guidance](https://database.ich.org/sites/default/files/E3_Guideline.pdf), 8 | primary and secondary efficacy endpoints need to be summarized 9 | in Section 11.4, Efficacy Results and Tabulations of Individual Participant. 10 | 11 | ```{r} 12 | library(haven) # Read SAS data 13 | library(dplyr) # Manipulate data 14 | library(tidyr) # Manipulate data 15 | library(r2rtf) # Reporting in RTF format 16 | library(emmeans) # LS mean estimation 17 | ``` 18 | 19 | In this chapter, we illustrate how to generate an efficacy table for a study. 20 | For efficacy analysis, only the change from baseline glucose data at week 24 is analyzed. 21 | 22 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 23 | knitr::include_graphics("tlf/tlf_eff.pdf") 24 | ``` 25 | 26 | ## Analysis dataset 27 | 28 | To prepare the analysis, both `adsl` and `adlbc` datasets are required. 29 | 30 | ```{r} 31 | adsl <- read_sas("data-adam/adsl.sas7bdat") 32 | adlb <- read_sas("data-adam/adlbc.sas7bdat") 33 | ``` 34 | 35 | First, both the population and the data in scope are selected. 36 | The analysis is done on the efficacy population, identified by `EFFFL == "Y"`, and 37 | all records post baseline (`AVISITN >= 1`) and on or before Week 24 (`AVISITN <= 24`). 38 | Here the variable `AVISITN` is the numerical analysis visit. 39 | For example, if the analysis visit is recorded as "Baseline" (i.e., `AVISIT = Baseline`), 40 | `AVISITN = 0`; 41 | if the analysis visit is recorded as "Week 24" (i.e., `AVISIT = Week 24`), `AVISITN = 24`; 42 | if the analysis visit is blank, `AVISITN` is also blank. 43 | We will discuss these missing values in Section 6.4. 44 | 45 | ```{r} 46 | gluc <- adlb %>% 47 | left_join(adsl %>% select(USUBJID, EFFFL), by = "USUBJID") %>% 48 | # PARAMCD is parameter code and here we focus on Glucose (mg/dL) 49 | filter(EFFFL == "Y" & PARAMCD == "GLUC") %>% 50 | arrange(TRTPN) %>% 51 | mutate(TRTP = factor(TRTP, levels = unique(TRTP))) 52 | 53 | ana <- gluc %>% 54 | filter(AVISITN > 0 & AVISITN <= 24) %>% 55 | arrange(AVISITN) %>% 56 | mutate(AVISIT = factor(AVISIT, levels = unique(AVISIT))) 57 | ``` 58 | 59 | Below is the first few records of the analysis dataset. 60 | 61 | - AVAL: analysis value 62 | - BASE: baseline value 63 | - CHG: change from baseline 64 | 65 | ```{r} 66 | ana %>% select(USUBJID, TRTPN, AVISIT, AVAL, BASE, CHG) 67 | ``` 68 | 69 | ## Helper functions 70 | 71 | To prepare the report, we create a few helper functions 72 | by using the `fmt_num()` function defined in @sec-population. 73 | 74 | - Format estimators 75 | 76 | ```{r} 77 | fmt_num <- function(x, digits, width = digits + 4) { 78 | formatC( 79 | x, 80 | digits = digits, 81 | format = "f", 82 | width = width 83 | ) 84 | } 85 | ``` 86 | 87 | ```{r} 88 | fmt_est <- function(.mean, 89 | .sd, 90 | digits = c(1, 2)) { 91 | .mean <- fmt_num(.mean, digits[1], width = digits[1] + 4) 92 | .sd <- fmt_num(.sd, digits[2], width = digits[2] + 3) 93 | paste0(.mean, " (", .sd, ")") 94 | } 95 | ``` 96 | 97 | - Format confidence interval 98 | 99 | ```{r} 100 | fmt_ci <- function(.est, 101 | .lower, 102 | .upper, 103 | digits = 2, 104 | width = digits + 3) { 105 | .est <- fmt_num(.est, digits, width) 106 | .lower <- fmt_num(.lower, digits, width) 107 | .upper <- fmt_num(.upper, digits, width) 108 | paste0(.est, " (", .lower, ",", .upper, ")") 109 | } 110 | ``` 111 | 112 | - Format p-value 113 | 114 | ```{r} 115 | fmt_pval <- function(.p, digits = 3) { 116 | scale <- 10^(-1 * digits) 117 | p_scale <- paste0("<", digits) 118 | if_else(.p < scale, p_scale, fmt_num(.p, digits = digits)) 119 | } 120 | ``` 121 | 122 | ## Summary of observed data 123 | 124 | First the observed data at Baseline and Week 24 are summarized using code below: 125 | 126 | ```{r} 127 | t11 <- gluc %>% 128 | filter(AVISITN %in% c(0, 24)) %>% 129 | group_by(TRTPN, TRTP, AVISITN) %>% 130 | summarise( 131 | n = n(), 132 | mean_sd = fmt_est(mean(AVAL), sd(AVAL)) 133 | ) %>% 134 | pivot_wider( 135 | id_cols = c(TRTP, TRTPN), 136 | names_from = AVISITN, 137 | values_from = c(n, mean_sd) 138 | ) 139 | 140 | t11 141 | ``` 142 | 143 | Also the observed change from baseline glucose at Week 24 is summarized using code below: 144 | 145 | ```{r} 146 | t12 <- gluc %>% 147 | filter(AVISITN %in% 24) %>% 148 | group_by(TRTPN, AVISITN) %>% 149 | summarise( 150 | n_chg = n(), 151 | mean_chg = fmt_est( 152 | mean(CHG, na.rm = TRUE), 153 | sd(CHG, na.rm = TRUE) 154 | ) 155 | ) 156 | 157 | t12 158 | ``` 159 | 160 | ## Missing data imputation 161 | 162 | In clinical trials, missing data is inevitable. 163 | In this study, there are missing values in glucose data. 164 | 165 | ```{r} 166 | count(ana, AVISIT) 167 | ``` 168 | 169 | For simplicity and illustration purpose, 170 | we use the last observation carried forward (LOCF) approach to handle missing data. 171 | LOCF approach is a single imputation approach that is **not recommended** 172 | in real application. 173 | Interested readers can find more discussion on missing data approaches in the book: 174 | [The Prevention and Treatment of Missing Data in Clinical Trials](https://www.ncbi.nlm.nih.gov/books/NBK209904/pdf/Bookshelf_NBK209904.pdf). 175 | 176 | ```{r} 177 | ana_locf <- ana %>% 178 | group_by(USUBJID) %>% 179 | mutate(locf = AVISITN == max(AVISITN)) %>% 180 | filter(locf) 181 | ``` 182 | 183 | ## ANCOVA model 184 | 185 | The imputed data is analyzed using the ANCOVA model with treatment and baseline glucose as covariates. 186 | 187 | ```{r} 188 | fit <- lm(CHG ~ BASE + TRTP, data = ana_locf) 189 | summary(fit) 190 | ``` 191 | 192 | The emmeans R package is used to obtain 193 | within and between group least square (LS) mean 194 | 195 | ```{r} 196 | fit_within <- emmeans(fit, "TRTP") 197 | fit_within 198 | ``` 199 | 200 | ```{r} 201 | t13 <- fit_within %>% 202 | as_tibble() %>% 203 | mutate(ls = fmt_ci(emmean, lower.CL, upper.CL)) %>% 204 | select(TRTP, ls) 205 | t13 206 | ``` 207 | 208 | ```{r} 209 | fit_between <- pairs(fit_within, reverse = TRUE) 210 | fit_between 211 | ``` 212 | 213 | ```{r} 214 | t2 <- fit_between %>% 215 | as_tibble() %>% 216 | mutate( 217 | ls = fmt_ci( 218 | estimate, 219 | estimate - 1.96 * SE, 220 | estimate + 1.96 * SE 221 | ), 222 | p = fmt_pval(p.value) 223 | ) %>% 224 | filter(stringr::str_detect(contrast, "- Placebo")) %>% 225 | select(contrast, ls, p) 226 | 227 | t2 228 | ``` 229 | 230 | ## Reporting 231 | 232 | `t11`, `t12` and `t13` are combined to get the first part of the report table 233 | 234 | ```{r} 235 | t1 <- cbind( 236 | t11 %>% ungroup() %>% select(TRTP, ends_with("0"), ends_with("24")), 237 | t12 %>% ungroup() %>% select(ends_with("chg")), 238 | t13 %>% ungroup() %>% select(ls) 239 | ) 240 | t1 241 | ``` 242 | 243 | Then r2rtf is used to prepare the table format for `t1`. 244 | We also highlight how to handle special characters in this example. 245 | 246 | Special characters `^` and `_` are used to define superscript and subscript of text. And `{}` is to define the part that will be impacted. 247 | For example, `{^a}` provides a superscript `a` for footnote notation. 248 | r2rtf also supports most LaTeX characters. 249 | Examples can be found on the 250 | [r2rtf get started page](https://merck.github.io/r2rtf/articles/r2rtf.html#special-character). 251 | The `text_convert` argument in `r2rtf_*()` functions controls whether to convert special characters. 252 | 253 | ```{r} 254 | t1_rtf <- t1 %>% 255 | data.frame() %>% 256 | rtf_title(c( 257 | "ANCOVA of Change from Baseline Glucose (mmol/L) at Week 24", 258 | "LOCF", 259 | "Efficacy Analysis Population" 260 | )) %>% 261 | rtf_colheader("| Baseline | Week 24 | Change from Baseline", 262 | col_rel_width = c(2.5, 2, 2, 4) 263 | ) %>% 264 | rtf_colheader( 265 | paste( 266 | "Treatment |", 267 | paste0(rep("N | Mean (SD) | ", 3), collapse = ""), 268 | "LS Mean (95% CI){^a}" 269 | ), 270 | col_rel_width = c(2.5, rep(c(0.5, 1.5), 3), 2) 271 | ) %>% 272 | rtf_body( 273 | text_justification = c("l", rep("c", 7)), 274 | col_rel_width = c(2.5, rep(c(0.5, 1.5), 3), 2) 275 | ) %>% 276 | rtf_footnote(c( 277 | "{^a}Based on an ANCOVA model after adjusting baseline value. LOCF approach is used to impute missing values.", 278 | "ANCOVA = Analysis of Covariance, LOCF = Last Observation Carried Forward", 279 | "CI = Confidence Interval, LS = Least Squares, SD = Standard Deviation" 280 | )) 281 | 282 | t1_rtf %>% 283 | rtf_encode() %>% 284 | write_rtf("tlf/tlf_eff1.rtf") 285 | ``` 286 | 287 | ```{r, include=FALSE} 288 | rtf2pdf("tlf/tlf_eff1.rtf") 289 | ``` 290 | 291 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 292 | knitr::include_graphics("tlf/tlf_eff1.pdf") 293 | ``` 294 | 295 | We also use r2rtf to prepare the table format for `t2` 296 | 297 | ```{r} 298 | t2_rtf <- t2 %>% 299 | data.frame() %>% 300 | rtf_colheader("Pairwise Comparison | Difference in LS Mean (95% CI){^a} | p-Value", 301 | col_rel_width = c(4.5, 4, 2) 302 | ) %>% 303 | rtf_body( 304 | text_justification = c("l", "c", "c"), 305 | col_rel_width = c(4.5, 4, 2) 306 | ) 307 | 308 | t2_rtf %>% 309 | rtf_encode() %>% 310 | write_rtf("tlf/tlf_eff2.rtf") 311 | ``` 312 | 313 | ```{r, include=FALSE} 314 | rtf2pdf("tlf/tlf_eff2.rtf") 315 | ``` 316 | 317 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 318 | knitr::include_graphics("tlf/tlf_eff2.pdf") 319 | ``` 320 | 321 | Finally, we combine the two parts to get the final table using r2rtf. 322 | This is achieved by providing a list of `t1_rtf` and `t2_rtf` as input for 323 | `rtf_encode`. 324 | 325 | ```{r} 326 | list(t1_rtf, t2_rtf) %>% 327 | rtf_encode() %>% 328 | write_rtf("tlf/tlf_eff.rtf") 329 | ``` 330 | 331 | ```{r, include=FALSE} 332 | rtf2pdf("tlf/tlf_eff.rtf") 333 | ``` 334 | 335 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 336 | knitr::include_graphics("tlf/tlf_eff.pdf") 337 | ``` 338 | 339 | In conclusion, the procedure to generate the above efficacy results table is summarized as follows. 340 | 341 | - Step 1: Read the data (i.e., `adsl` and `adlb`) into R. 342 | - Step 2: Define the analysis dataset. In this example, we define two analysis datasets. The first dataset is the efficacy population (`gluc`). The second dataset is the collection of all records post baseline and on or before week 24 (`ana`). 343 | - Step 3: Impute the missing values. In this example, we name the `ana` dataset after imputation as `ana_locf`. 344 | - Step 4: Calculate the mean and standard derivation of efficacy endpoint (i.e., `gluc`), and then format it into an RTF table. 345 | - Step 5: Calculate the pairwise comparison by ANCOVA model, and then format it into an RTF table. 346 | - Step 6: Combine the outputs from steps 4 and 5 by rows. 347 | -------------------------------------------------------------------------------- /tlf-efficacy-km.qmd: -------------------------------------------------------------------------------- 1 | # Efficacy figure 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | Following the [ICH E3 guidance](https://database.ich.org/sites/default/files/E3_Guideline.pdf), 8 | primary and secondary efficacy endpoints need to be summarized 9 | in Section 11.4, Efficacy Results and Tabulations of Individual Participant. 10 | 11 | ```{r} 12 | library(haven) # Read SAS data 13 | library(dplyr) # Manipulate data 14 | library(r2rtf) # Reporting in RTF format 15 | library(survival) # Fit survival model 16 | ``` 17 | 18 | In this chapter, we illustrate how to create a simplified Kaplan-Meier plot in a study. 19 | For the survival analysis in efficacy, time to dermatologic event (TTDE) will be analyzed. 20 | 21 | ::: {.callout-note} 22 | R packages such as 23 | [visR](https://cran.r-project.org/package=visR) and 24 | [survminer](https://cran.r-project.org/package=survminer) 25 | can create more informative Kaplan-Meier plots. 26 | Interested readers can find examples on their websites. 27 | ::: 28 | 29 | ## Analysis dataset 30 | 31 | To prepare the analysis, the `adtte` dataset is required. 32 | 33 | ```{r} 34 | adtte <- read_sas("data-adam/adtte.sas7bdat") 35 | ``` 36 | 37 | First, to prepare the analysis ready data, 38 | filter all records for the efficacy endpoint of time to event of interest (`TTDE`) 39 | using `PARAMCD` (or `PARAM`, `PRAMN`), then select the survival analysis related variables: 40 | 41 | - `TRTP`: treatment arm (using corresponding numeric code `TRTAN` to re-order the levels, "Placebo" will be the reference level) 42 | - `AVAL`: time-to-event analysis value 43 | - `CNSR`: event (censoring) status 44 | 45 | ```{r} 46 | adtte_ttde <- adtte %>% 47 | filter(PARAMCD == "TTDE") %>% 48 | select(TRTP, TRTAN, AVAL, CNSR) %>% 49 | mutate( 50 | TRTP = forcats::fct_reorder(TRTP, TRTAN), # Recorder levels 51 | AVAL_m = AVAL / 30.4367 # Convert Day to Month 52 | ) 53 | ``` 54 | 55 | ## Create Kaplan-Meier curve 56 | 57 | The survival package is used to obtain the K-M estimate. 58 | 59 | ```{r} 60 | # Fit survival model, convert the time value from Days to Month 61 | fit <- survfit(Surv(AVAL_m, 1 - CNSR) ~ TRTP, data = adtte_ttde) 62 | ``` 63 | 64 | We save the simplified K-M plot into a `.png` file using code below. 65 | 66 | ```{r, results = FALSE} 67 | # Save as a PNG file 68 | png( 69 | file = "tlf/fig_km.png", 70 | width = 3000, 71 | height = 2000, 72 | res = 300 73 | ) 74 | 75 | plot( 76 | fit, 77 | xlab = "Time in Months", 78 | ylab = "Survival probability", 79 | mark.time = TRUE, 80 | lwd = 2, 81 | col = c(2, 3, 4), 82 | lty = c(1, 2, 3) 83 | ) 84 | 85 | dev.off() 86 | ``` 87 | 88 | Now, we can use the r2rtf package to create a formatted RTF figure. 89 | More details can be found on the [r2rtf website](https://merck.github.io/r2rtf/articles/example-figure.html). 90 | 91 | ```{r} 92 | # Create RTF figure 93 | rtf_read_figure("tlf/fig_km.png") %>% # Read the PNG file from the file path 94 | rtf_title( 95 | "Kaplan-Meier Plot for Time to First Dermatologic Event by Treatment Group", 96 | "All Participants" 97 | ) %>% # Add title or subtitle 98 | rtf_footnote("footnote") %>% # Add footnote 99 | rtf_source("[datasource: adam-adtte]") %>% # Add data source 100 | rtf_figure(fig_width = 6, fig_height = 4) %>% # Set proportional figure size to the original PNG figure size 101 | rtf_encode(doc_type = "figure") %>% # Encode figure as rtf 102 | write_rtf(file = "tlf/tlf_km.rtf") 103 | ``` 104 | 105 | ```{r, include=FALSE} 106 | rtf2pdf("tlf/tlf_km.rtf") 107 | ``` 108 | 109 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 110 | knitr::include_graphics("tlf/tlf_km.pdf") 111 | ``` 112 | 113 | In conclusion, the steps to create a K-M plot are as follows. 114 | 115 | - Step 1: Read the data `adtte` into R. 116 | - Step 2: Define the analysis-ready dataset. In this example, we define the analysis dataset for the TTDE endpoint `adtte_ttde`. 117 | - Step 3: Save figures into `png` files based on required analysis specification. 118 | - Step 4: Create RTF output using the r2rtf package. 119 | -------------------------------------------------------------------------------- /tlf-population.qmd: -------------------------------------------------------------------------------- 1 | # Analysis population {#sec-population} 2 | 3 | ```{r, include=FALSE} 4 | source("_common.R") 5 | ``` 6 | 7 | Following [ICH E3 8 | guidance](https://database.ich.org/sites/default/files/E3_Guideline.pdf), 9 | we need to summarize the number of participants included in each efficacy 10 | analysis in Section 11.1, Data Sets Analysed. 11 | 12 | ```{r} 13 | library(haven) # Read SAS data 14 | library(dplyr) # Manipulate data 15 | library(tidyr) # Manipulate data 16 | library(r2rtf) # Reporting in RTF format 17 | ``` 18 | 19 | In this chapter, we illustrate how to create a summary table for 20 | the analysis population for a study. 21 | 22 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 23 | knitr::include_graphics("tlf/tbl_pop.pdf") 24 | ``` 25 | 26 | The first step is to read relevant datasets into R. For the analysis 27 | population table, all the required information is saved in the ADSL 28 | dataset. We can use the `haven` package to read the dataset. 29 | 30 | ```{r} 31 | adsl <- read_sas("data-adam/adsl.sas7bdat") 32 | ``` 33 | 34 | We illustrate how to prepare a report data for a simplified analysis 35 | population table using variables below: 36 | 37 | - USUBJID: unique subject identifier 38 | - ITTFL: intent-to-treat population flag 39 | - EFFFL: efficacy population flag 40 | - SAFFL: safety population flag 41 | 42 | ```{r} 43 | adsl %>% select(USUBJID, ITTFL, EFFFL, SAFFL) 44 | ``` 45 | 46 | ## Helper functions 47 | 48 | Before we write the analysis code, let's discuss the possibility of reusing R 49 | code by writing helper functions. 50 | 51 | As discussed in [R for data 52 | science](https://r4ds.had.co.nz/functions.html#when-should-you-write-a-function), 53 | "You should consider writing a function whenever you've copied and 54 | pasted a block of code more than twice". 55 | 56 | In @sec-disposition, there are a few repeating steps to: 57 | 58 | - Format the percentages using the `formatC()` function. 59 | - Calculate the numbers and percentages by treatment arm. 60 | 61 | We create two ad-hoc functions and use them to create the 62 | tables in the rest of this book. 63 | 64 | To format numbers and percentages, we create a function called 65 | `fmt_num()`. It is a very simple function wrapping `formatC()`. 66 | 67 | ```{r} 68 | fmt_num <- function(x, digits, width = digits + 4) { 69 | formatC( 70 | x, 71 | digits = digits, 72 | format = "f", 73 | width = width 74 | ) 75 | } 76 | ``` 77 | 78 | The main reason to create the `fmt_num()` function is to enhance the 79 | readability of the analysis code. 80 | 81 | For example, we can compare the two versions of code to format the 82 | percentage used in @sec-disposition and `fmt_num()`. 83 | 84 | ```{r, eval = FALSE} 85 | formatC(n / n() * 100, 86 | digits = 1, format = "f", width = 5 87 | ) 88 | ``` 89 | 90 | ```{r, eval = FALSE} 91 | fmt_num(n / n() * 100, digits = 1) 92 | ``` 93 | 94 | To calculate the numbers and percentages of participants by groups, we 95 | provide a simple (but not robust) wrapper function, `count_by()`, using 96 | the dplyr and tidyr package. 97 | 98 | The function can be enhanced in multiple ways, but here we only focus on 99 | simplicity and readability. More details about writing R functions can 100 | be found in the [STAT 545 101 | course](https://stat545.com/functions-part1.html). 102 | 103 | ```{r} 104 | count_by <- function(data, # Input data set 105 | grp, # Group variable 106 | var, # Analysis variable 107 | var_label = var, # Analysis variable label 108 | id = "USUBJID") { # Subject ID variable 109 | data <- data %>% rename(grp = !!grp, var = !!var, id = !!id) 110 | 111 | left_join( 112 | count(data, grp, var), 113 | count(data, grp, name = "tot"), 114 | by = "grp", 115 | ) %>% 116 | mutate( 117 | pct = fmt_num(100 * n / tot, digits = 1), 118 | n = fmt_num(n, digits = 0), 119 | npct = paste0(n, " (", pct, ")") 120 | ) %>% 121 | pivot_wider( 122 | id_cols = var, 123 | names_from = grp, 124 | values_from = c(n, pct, npct), 125 | values_fill = list(n = "0", pct = fmt_num(0, digits = 0)) 126 | ) %>% 127 | mutate(var_label = var_label) 128 | } 129 | ``` 130 | 131 | By using the `count_by()` function, we can simplify the analysis code as 132 | below. 133 | 134 | ```{r} 135 | count_by(adsl, "TRT01PN", "EFFFL") %>% 136 | select(-ends_with(c("_54", "_81"))) 137 | ``` 138 | 139 | ## Analysis code 140 | 141 | With the helper function `count_by`, we can easily prepare a report 142 | dataset as 143 | 144 | ```{r} 145 | # Derive a randomization flag 146 | adsl <- adsl %>% mutate(RANDFL = "Y") 147 | 148 | pop <- count_by(adsl, "TRT01PN", "RANDFL", 149 | var_label = "Participants in Population" 150 | ) %>% 151 | select(var_label, starts_with("n_")) 152 | ``` 153 | 154 | ```{r} 155 | pop1 <- bind_rows( 156 | count_by(adsl, "TRT01PN", "ITTFL", 157 | var_label = "Participants included in ITT population" 158 | ), 159 | count_by(adsl, "TRT01PN", "EFFFL", 160 | var_label = "Participants included in efficacy population" 161 | ), 162 | count_by(adsl, "TRT01PN", "SAFFL", 163 | var_label = "Participants included in safety population" 164 | ) 165 | ) %>% 166 | filter(var == "Y") %>% 167 | select(var_label, starts_with("npct_")) 168 | ``` 169 | 170 | Now we combine individual rows into one table for reporting 171 | purpose. `tbl_pop` is used as input for r2rtf to create the final 172 | report. 173 | 174 | ```{r} 175 | names(pop) <- gsub("n_", "npct_", names(pop)) 176 | tbl_pop <- bind_rows(pop, pop1) 177 | 178 | tbl_pop %>% select(var_label, npct_0) 179 | ``` 180 | 181 | We define the format of the output using code below. 182 | 183 | ```{r} 184 | rel_width <- c(2, rep(1, 3)) 185 | colheader <- " | Placebo | Xanomeline line Low Dose| Xanomeline line High Dose" 186 | tbl_pop %>% 187 | # Table title 188 | rtf_title( 189 | "Summary of Analysis Sets", 190 | "(All Participants Randomized)" 191 | ) %>% 192 | # First row of column header 193 | rtf_colheader(colheader, 194 | col_rel_width = rel_width 195 | ) %>% 196 | # Second row of column header 197 | rtf_colheader(" | n (%) | n (%) | n (%)", 198 | border_top = "", 199 | col_rel_width = rel_width 200 | ) %>% 201 | # Table body 202 | rtf_body( 203 | col_rel_width = rel_width, 204 | text_justification = c("l", rep("c", 3)) 205 | ) %>% 206 | # Encoding RTF syntax 207 | rtf_encode() %>% 208 | # Save to a file 209 | write_rtf("tlf/tbl_pop.rtf") 210 | ``` 211 | 212 | ```{r, include=FALSE} 213 | rtf2pdf("tlf/tbl_pop.rtf") 214 | ``` 215 | 216 | ```{r, out.width = "100%", out.height = if (knitr::is_html_output()) "400px", echo = FALSE, fig.align = "center"} 217 | knitr::include_graphics("tlf/tbl_pop.pdf") 218 | ``` 219 | 220 | The procedure to generate an analysis population table can be summarized 221 | as follows: 222 | 223 | - Step 1: Read data (i.e., `adsl`) into R. 224 | - Step 2: Bind the counts/percentages of the ITT population, the 225 | efficacy population, and the safety population by row using the 226 | `count_by()` function. 227 | - Step 3: Format the output from Step 2 using r2rtf. 228 | -------------------------------------------------------------------------------- /tlf/fig_km.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/fig_km.png -------------------------------------------------------------------------------- /tlf/intro-ae1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/intro-ae1.pdf -------------------------------------------------------------------------------- /tlf/intro-ae1.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2250 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4500 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6750 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 AEDECOD}\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline High Dose}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline Low Dose}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 38 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ABDOMINAL PAIN}\cell 39 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 40 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 42 | \intbl\row\pard 43 | \trowd\trgaph108\trleft0\trqc 44 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 45 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 46 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 47 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 48 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 AGITATION}\cell 49 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 50 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 51 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 52 | \intbl\row\pard 53 | \trowd\trgaph108\trleft0\trqc 54 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 56 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 57 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 58 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ALOPECIA}\cell 59 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 62 | \intbl\row\pard 63 | \trowd\trgaph108\trleft0\trqc 64 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 65 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 66 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 67 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 68 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ANXIETY}\cell 69 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 70 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 71 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4}\cell 72 | \intbl\row\pard 73 | \trowd\trgaph108\trleft0\trqc 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 77 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE DERMATITIS}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 9}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 15}\cell 82 | \intbl\row\pard 83 | \trowd\trgaph108\trleft0\trqc 84 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx2250 85 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx4500 86 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx6750 87 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 88 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE ERYTHEMA}\cell 89 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 90 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 23}\cell 91 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 20}\cell 92 | \intbl\row\pard 93 | 94 | 95 | 96 | } 97 | -------------------------------------------------------------------------------- /tlf/intro-ae2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/intro-ae2.pdf -------------------------------------------------------------------------------- /tlf/intro-ae2.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2250 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4500 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6750 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 AEDECOD}\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline High Dose}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline Low Dose}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 38 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ABDOMINAL PAIN}\cell 39 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 40 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 42 | \intbl\row\pard 43 | \trowd\trgaph108\trleft0\trqc 44 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 45 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 46 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 47 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 48 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 AGITATION}\cell 49 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 50 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 51 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 52 | \intbl\row\pard 53 | \trowd\trgaph108\trleft0\trqc 54 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 56 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 57 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 58 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ALOPECIA}\cell 59 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 62 | \intbl\row\pard 63 | \trowd\trgaph108\trleft0\trqc 64 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 65 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 66 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 67 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 68 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ANXIETY}\cell 69 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 70 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 71 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4}\cell 72 | \intbl\row\pard 73 | \trowd\trgaph108\trleft0\trqc 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 77 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE DERMATITIS}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 9}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 15}\cell 82 | \intbl\row\pard 83 | \trowd\trgaph108\trleft0\trqc 84 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx3000 85 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx5000 86 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx7000 87 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 88 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE ERYTHEMA}\cell 89 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 90 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 23}\cell 91 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 20}\cell 92 | \intbl\row\pard 93 | 94 | 95 | 96 | } 97 | -------------------------------------------------------------------------------- /tlf/intro-ae3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/intro-ae3.pdf -------------------------------------------------------------------------------- /tlf/intro-ae3.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3000 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5000 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7000 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Adverse Events}\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline High Dose}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline Low Dose}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 38 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ABDOMINAL PAIN}\cell 39 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 40 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 42 | \intbl\row\pard 43 | \trowd\trgaph108\trleft0\trqc 44 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 45 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 46 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 47 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 48 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 AGITATION}\cell 49 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 50 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 51 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 52 | \intbl\row\pard 53 | \trowd\trgaph108\trleft0\trqc 54 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 56 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 57 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 58 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ALOPECIA}\cell 59 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 62 | \intbl\row\pard 63 | \trowd\trgaph108\trleft0\trqc 64 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 65 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 66 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 67 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 68 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ANXIETY}\cell 69 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 70 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 71 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4}\cell 72 | \intbl\row\pard 73 | \trowd\trgaph108\trleft0\trqc 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 77 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE DERMATITIS}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 9}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 15}\cell 82 | \intbl\row\pard 83 | \trowd\trgaph108\trleft0\trqc 84 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx3000 85 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx5000 86 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx7000 87 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 88 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE ERYTHEMA}\cell 89 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 90 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 23}\cell 91 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 20}\cell 92 | \intbl\row\pard 93 | 94 | 95 | 96 | } 97 | -------------------------------------------------------------------------------- /tlf/intro-ae5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/intro-ae5.pdf -------------------------------------------------------------------------------- /tlf/intro-ae5.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2250 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4500 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6750 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 AEDECOD}\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline High Dose}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline Low Dose}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 38 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 ABDOMINAL PAIN}\cell 39 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 40 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 42 | \intbl\row\pard 43 | \trowd\trgaph108\trleft0\trqc 44 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 45 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 46 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 47 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 48 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 AGITATION}\cell 49 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 50 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 51 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 52 | \intbl\row\pard 53 | \trowd\trgaph108\trleft0\trqc 54 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 56 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 57 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 58 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 ALOPECIA}\cell 59 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 62 | \intbl\row\pard 63 | \trowd\trgaph108\trleft0\trqc 64 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 65 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 66 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 67 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 68 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 ANXIETY}\cell 69 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 70 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 71 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4}\cell 72 | \intbl\row\pard 73 | \trowd\trgaph108\trleft0\trqc 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 77 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 APPLICATION SITE DERMATITIS}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 9}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 15}\cell 82 | \intbl\row\pard 83 | \trowd\trgaph108\trleft0\trqc 84 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx2250 85 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx4500 86 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx6750 87 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 88 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 APPLICATION SITE ERYTHEMA}\cell 89 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 90 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 23}\cell 91 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 20}\cell 92 | \intbl\row\pard 93 | 94 | 95 | 96 | } 97 | -------------------------------------------------------------------------------- /tlf/intro-ae7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/intro-ae7.pdf -------------------------------------------------------------------------------- /tlf/intro-ae7.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3000 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 26 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 27 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Treatment}\cell 28 | \intbl\row\pard 29 | \trowd\trgaph108\trleft0\trqc 30 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3000 31 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5000 32 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7000 33 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 34 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Adverse Events}\cell 35 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 36 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline High Dose}\cell 37 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline Low Dose}\cell 38 | \intbl\row\pard 39 | \trowd\trgaph108\trleft0\trqc 40 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 41 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 42 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 43 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 44 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ABDOMINAL PAIN}\cell 45 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 46 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 47 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 48 | \intbl\row\pard 49 | \trowd\trgaph108\trleft0\trqc 50 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 51 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 52 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 53 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 54 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 AGITATION}\cell 55 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 56 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 57 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 58 | \intbl\row\pard 59 | \trowd\trgaph108\trleft0\trqc 60 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 61 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 62 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 63 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 64 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ALOPECIA}\cell 65 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 66 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 67 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 68 | \intbl\row\pard 69 | \trowd\trgaph108\trleft0\trqc 70 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 71 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 72 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 73 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 74 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ANXIETY}\cell 75 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 76 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 77 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4}\cell 78 | \intbl\row\pard 79 | \trowd\trgaph108\trleft0\trqc 80 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3000 81 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 82 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 83 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 84 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE DERMATITIS}\cell 85 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 9}\cell 86 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12}\cell 87 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 15}\cell 88 | \intbl\row\pard 89 | \trowd\trgaph108\trleft0\trqc 90 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx3000 91 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx5000 92 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx7000 93 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 94 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 APPLICATION SITE ERYTHEMA}\cell 95 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3}\cell 96 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 23}\cell 97 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 20}\cell 98 | \intbl\row\pard 99 | 100 | 101 | 102 | } 103 | -------------------------------------------------------------------------------- /tlf/rtf-combine-toggle.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/rtf-combine-toggle.docx -------------------------------------------------------------------------------- /tlf/rtf-combine.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/rtf-combine.pdf -------------------------------------------------------------------------------- /tlf/tbl_disp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tbl_disp.pdf -------------------------------------------------------------------------------- /tlf/tbl_pop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tbl_pop.pdf -------------------------------------------------------------------------------- /tlf/tbl_pop.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | {\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Summary of Analysis Sets}\line\fs24{\f0 (All Participants Randomized)}\par} 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3600 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5400 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7200 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline line Low Dose}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline line High Dose}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3600 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5400 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7200 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 38 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 39 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 n (%)}\cell 40 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 n (%)}\cell 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 n (%)}\cell 42 | \intbl\row\pard 43 | \trowd\trgaph108\trleft0\trqc 44 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3600 45 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5400 46 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7200 47 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 48 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Participants in Population}\cell 49 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 86}\cell 50 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84}\cell 51 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84}\cell 52 | \intbl\row\pard 53 | \trowd\trgaph108\trleft0\trqc 54 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3600 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5400 56 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7200 57 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 58 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Participants included in ITT population}\cell 59 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 86 (100.0)}\cell 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84 (100.0)}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84 (100.0)}\cell 62 | \intbl\row\pard 63 | \trowd\trgaph108\trleft0\trqc 64 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3600 65 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5400 66 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7200 67 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 68 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Participants included in efficacy population}\cell 69 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 79 ( 91.9)}\cell 70 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 81 ( 96.4)}\cell 71 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 74 ( 88.1)}\cell 72 | \intbl\row\pard 73 | \trowd\trgaph108\trleft0\trqc 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx3600 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx5400 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx7200 77 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Participants included in safety population}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 86 (100.0)}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84 (100.0)}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84 (100.0)}\cell 82 | \intbl\row\pard 83 | 84 | 85 | 86 | } 87 | -------------------------------------------------------------------------------- /tlf/tlf_ae_summary.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tlf_ae_summary.pdf -------------------------------------------------------------------------------- /tlf/tlf_ae_summary.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | {\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Analysis of Adverse Event Summary}\line\fs24{\f0 (Safety Analysis Population)}\par} 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3316 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5211 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7106 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9001 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline Low Dose}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline High Dose}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3316 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3979 36 | \clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5211 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5874 38 | \clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7106 39 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7769 40 | \clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9001 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 42 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 n}\cell 43 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 (%)}\cell 44 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 n}\cell 45 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 (%)}\cell 46 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 n}\cell 47 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 (%)}\cell 48 | \intbl\row\pard 49 | \trowd\trgaph108\trleft0\trqc 50 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3316 51 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3979 52 | \clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5211 53 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5874 54 | \clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7106 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7769 56 | \clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9001 57 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Participants in population}\cell 58 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 86}\cell 59 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 62 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 84}\cell 63 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 64 | \intbl\row\pard 65 | \trowd\trgaph108\trleft0\trqc 66 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3316 67 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3979 68 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5211 69 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5874 70 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7106 71 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7769 72 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9001 73 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 With one or more adverse events}\cell 74 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 69}\cell 75 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 80.2)}\cell 76 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 77}\cell 77 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 91.7)}\cell 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 79}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 94.0)}\cell 80 | \intbl\row\pard 81 | \trowd\trgaph108\trleft0\trqc 82 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3316 83 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3979 84 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5211 85 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5874 86 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7106 87 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7769 88 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9001 89 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 With drug-related adverse events}\cell 90 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 44}\cell 91 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 51.2)}\cell 92 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 73}\cell 93 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 86.9)}\cell 94 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 70}\cell 95 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 83.3)}\cell 96 | \intbl\row\pard 97 | \trowd\trgaph108\trleft0\trqc 98 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3316 99 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3979 100 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5211 101 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5874 102 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7106 103 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7769 104 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9001 105 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 With serious adverse events}\cell 106 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 107 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 0.0)}\cell 108 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 109 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 1.2)}\cell 110 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 111 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 2.4)}\cell 112 | \intbl\row\pard 113 | \trowd\trgaph108\trleft0\trqc 114 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3316 115 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3979 116 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5211 117 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5874 118 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7106 119 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7769 120 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9001 121 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 With serious drug-related adverse events}\cell 122 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 123 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 0.0)}\cell 124 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 125 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 1.2)}\cell 126 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 127 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 1.2)}\cell 128 | \intbl\row\pard 129 | \trowd\trgaph108\trleft0\trqc 130 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx3316 131 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx3979 132 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5211 133 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5874 134 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7106 135 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7769 136 | \clbrdrl\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9001 137 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Who died}\cell 138 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2}\cell 139 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 2.3)}\cell 140 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1}\cell 141 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 1.2)}\cell 142 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0}\cell 143 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ( 0.0)}\cell 144 | \intbl\row\pard 145 | \trowd\trgaph108\trleft0\trqc 146 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 147 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Every subject is counted a single time for each applicable row and column.}\cell 148 | \intbl\row\pard 149 | 150 | 151 | } 152 | -------------------------------------------------------------------------------- /tlf/tlf_base.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tlf_base.pdf -------------------------------------------------------------------------------- /tlf/tlf_base.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | {\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Baseline Characteristics of Participants}\line\fs24{\f0 (All Participants Randomized)}\par} 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3462 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4847 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6232 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7617 28 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9002 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Placebo}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline High Dose}\cell 32 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Xanomeline Low Dose}\cell 33 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Overall}\cell 34 | \intbl\row\pard 35 | \trowd\trgaph108\trleft0\trqc 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3462 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4847 38 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6232 39 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7617 40 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9002 41 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 42 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 (N=86)}\cell 43 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 (N=84)}\cell 44 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 (N=84)}\cell 45 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 (N=254)}\cell 46 | \intbl\row\pard 47 | \trowd\trgaph108\trleft0\trqc 48 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 49 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 50 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 51 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 52 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 53 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 SEX}\cell 54 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 55 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 56 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 57 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 58 | \intbl\row\pard 59 | \trowd\trgaph108\trleft0\trqc 60 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 61 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 62 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 63 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 64 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 65 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 Female}\cell 66 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 53 (61.6%)}\cell 67 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 40 (47.6%)}\cell 68 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 50 (59.5%)}\cell 69 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 143 (56.3%)}\cell 70 | \intbl\row\pard 71 | \trowd\trgaph108\trleft0\trqc 72 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 73 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 77 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 Male}\cell 78 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 33 (38.4%)}\cell 79 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 44 (52.4%)}\cell 80 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 34 (40.5%)}\cell 81 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 111 (43.7%)}\cell 82 | \intbl\row\pard 83 | \trowd\trgaph108\trleft0\trqc 84 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 85 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 86 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 87 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 88 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 89 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 Age}\cell 90 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 91 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 92 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 93 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 94 | \intbl\row\pard 95 | \trowd\trgaph108\trleft0\trqc 96 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 97 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 98 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 99 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 100 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 101 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 Mean (SD)}\cell 102 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 75.2 (8.59)}\cell 103 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 74.4 (7.89)}\cell 104 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 75.7 (8.29)}\cell 105 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 75.1 (8.25)}\cell 106 | \intbl\row\pard 107 | \trowd\trgaph108\trleft0\trqc 108 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 109 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 110 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 111 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 112 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 113 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 Median [Min, Max]}\cell 114 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 76.0 [52.0, 89.0]}\cell 115 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 76.0 [56.0, 88.0]}\cell 116 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 77.5 [51.0, 88.0]}\cell 117 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 77.0 [51.0, 89.0]}\cell 118 | \intbl\row\pard 119 | \trowd\trgaph108\trleft0\trqc 120 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 121 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 122 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 123 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 124 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 125 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 RACE}\cell 126 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 127 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 128 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 129 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 }\cell 130 | \intbl\row\pard 131 | \trowd\trgaph108\trleft0\trqc 132 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 133 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 134 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 135 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 136 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 137 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 Black or African American}\cell 138 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 8 (9.3%)}\cell 139 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 9 (10.7%)}\cell 140 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 6 (7.1%)}\cell 141 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 23 (9.1%)}\cell 142 | \intbl\row\pard 143 | \trowd\trgaph108\trleft0\trqc 144 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3462 145 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4847 146 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6232 147 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7617 148 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 149 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 White}\cell 150 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 78 (90.7%)}\cell 151 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 74 (88.1%)}\cell 152 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 78 (92.9%)}\cell 153 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 230 (90.6%)}\cell 154 | \intbl\row\pard 155 | \trowd\trgaph108\trleft0\trqc 156 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx3462 157 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx4847 158 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx6232 159 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx7617 160 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9002 161 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\ql\fs18{\f0 American Indian or Alaska Native}\cell 162 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 0 (0%)}\cell 163 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 1 (1.2%)}\cell 164 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 0 (0%)}\cell 165 | \pard\hyphpar0\sb15\sa15\fi-240\li180\ri0\qc\fs18{\f0 1 (0.4%)}\cell 166 | \intbl\row\pard 167 | 168 | 169 | 170 | } 171 | -------------------------------------------------------------------------------- /tlf/tlf_eff.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tlf_eff.pdf -------------------------------------------------------------------------------- /tlf/tlf_eff.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | {\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 ANCOVA of Change from Baseline Glucose (mmol/L) at Week 24}\line\fs24{\f0 LOCF}\line\fs24{\f0 Efficacy Analysis Population}\par} 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2143 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3857 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5571 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Baseline}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Week 24}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Change from Baseline}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2143 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2572 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3858 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4287 38 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5573 39 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6002 40 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7288 41 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9002 42 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Treatment}\cell 43 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 N}\cell 44 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Mean (SD)}\cell 45 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 N}\cell 46 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Mean (SD)}\cell 47 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 N}\cell 48 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Mean (SD)}\cell 49 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 LS Mean (95% CI){\super a}}\cell 50 | \intbl\row\pard 51 | \trowd\trgaph108\trleft0\trqc 52 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2143 53 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2572 54 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3858 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4287 56 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5573 57 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6002 58 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7288 59 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Placebo}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 79}\cell 62 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.7 ( 2.23)}\cell 63 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 57}\cell 64 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.7 ( 1.83)}\cell 65 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 57}\cell 66 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.1 ( 2.68)}\cell 67 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.07 (-0.27, 0.41)}\cell 68 | \intbl\row\pard 69 | \trowd\trgaph108\trleft0\trqc 70 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2143 71 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2572 72 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3858 73 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4287 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5573 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6002 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7288 77 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline Low Dose}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 79}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.4 ( 0.95)}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 26}\cell 82 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.7 ( 1.26)}\cell 83 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 26}\cell 84 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.2 ( 0.82)}\cell 85 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.11 (-0.45, 0.23)}\cell 86 | \intbl\row\pard 87 | \trowd\trgaph108\trleft0\trqc 88 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2143 89 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2572 90 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx3858 91 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx4287 92 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5573 93 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx6002 94 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7288 95 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9002 96 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline High Dose}\cell 97 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 74}\cell 98 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.4 ( 1.37)}\cell 99 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 30}\cell 100 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 6.0 ( 1.92)}\cell 101 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 30}\cell 102 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5 ( 1.94)}\cell 103 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.40 ( 0.05, 0.75)}\cell 104 | \intbl\row\pard 105 | 106 | 107 | 108 | 109 | \paperw12240\paperh15840 110 | 111 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 112 | 113 | 114 | 115 | 116 | \trowd\trgaph108\trleft0\trqc 117 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3857 118 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7286 119 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 120 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Pairwise Comparison}\cell 121 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Difference in LS Mean (95% CI){\super a}}\cell 122 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p-Value}\cell 123 | \intbl\row\pard 124 | \trowd\trgaph108\trleft0\trqc 125 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3857 126 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7286 127 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 128 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline Low Dose - Placebo}\cell 129 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.17 (-0.65, 0.30)}\cell 130 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.757}\cell 131 | \intbl\row\pard 132 | \trowd\trgaph108\trleft0\trqc 133 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx3857 134 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7286 135 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 136 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline High Dose - Placebo}\cell 137 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.33 (-0.16, 0.82)}\cell 138 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.381}\cell 139 | \intbl\row\pard 140 | \trowd\trgaph108\trleft0\trqc 141 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 142 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 {\super a}Based on an ANCOVA model after adjusting baseline value. LOCF approach is used to impute missing values.\line ANCOVA = Analysis of Covariance, LOCF = Last Observation Carried Forward\line CI = Confidence Interval, LS = Least Squares, SD = Standard Deviation}\cell 143 | \intbl\row\pard 144 | 145 | 146 | 147 | } 148 | -------------------------------------------------------------------------------- /tlf/tlf_eff1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tlf_eff1.pdf -------------------------------------------------------------------------------- /tlf/tlf_eff1.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | {\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 ANCOVA of Change from Baseline Glucose (mmol/L) at Week 24}\line\fs24{\f0 LOCF}\line\fs24{\f0 Efficacy Analysis Population}\par} 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2143 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3857 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5571 27 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Baseline}\cell 30 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Week 24}\cell 31 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Change from Baseline}\cell 32 | \intbl\row\pard 33 | \trowd\trgaph108\trleft0\trqc 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2143 35 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2572 36 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3858 37 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4287 38 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5573 39 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6002 40 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7288 41 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9002 42 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Treatment}\cell 43 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 N}\cell 44 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Mean (SD)}\cell 45 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 N}\cell 46 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Mean (SD)}\cell 47 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 N}\cell 48 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Mean (SD)}\cell 49 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 LS Mean (95% CI){\super a}}\cell 50 | \intbl\row\pard 51 | \trowd\trgaph108\trleft0\trqc 52 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2143 53 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2572 54 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3858 55 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4287 56 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5573 57 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6002 58 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7288 59 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 60 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Placebo}\cell 61 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 79}\cell 62 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.7 ( 2.23)}\cell 63 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 57}\cell 64 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.7 ( 1.83)}\cell 65 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 57}\cell 66 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.1 ( 2.68)}\cell 67 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.07 (-0.27, 0.41)}\cell 68 | \intbl\row\pard 69 | \trowd\trgaph108\trleft0\trqc 70 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2143 71 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2572 72 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3858 73 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4287 74 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5573 75 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6002 76 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7288 77 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9002 78 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline Low Dose}\cell 79 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 79}\cell 80 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.4 ( 0.95)}\cell 81 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 26}\cell 82 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.7 ( 1.26)}\cell 83 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 26}\cell 84 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.2 ( 0.82)}\cell 85 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.11 (-0.45, 0.23)}\cell 86 | \intbl\row\pard 87 | \trowd\trgaph108\trleft0\trqc 88 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2143 89 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2572 90 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx3858 91 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx4287 92 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5573 93 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx6002 94 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7288 95 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9002 96 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline High Dose}\cell 97 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 74}\cell 98 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 5.4 ( 1.37)}\cell 99 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 30}\cell 100 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 6.0 ( 1.92)}\cell 101 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 30}\cell 102 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5 ( 1.94)}\cell 103 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.40 ( 0.05, 0.75)}\cell 104 | \intbl\row\pard 105 | \trowd\trgaph108\trleft0\trqc 106 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 107 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 {\super a}Based on an ANCOVA model after adjusting baseline value. LOCF approach is used to impute missing values.\line ANCOVA = Analysis of Covariance, LOCF = Last Observation Carried Forward\line CI = Confidence Interval, LS = Least Squares, SD = Standard Deviation}\cell 108 | \intbl\row\pard 109 | 110 | 111 | } 112 | -------------------------------------------------------------------------------- /tlf/tlf_eff2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tlf_eff2.pdf -------------------------------------------------------------------------------- /tlf/tlf_eff2.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi 2 | \deff0\deflang1033 3 | {\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} 4 | {\f1\froman\fcharset161\fprq2 Times New Roman Greek;} 5 | {\f2\fswiss\fcharset161\fprq2 Arial Greek;} 6 | {\f3\fswiss\fcharset161\fprq2 Arial;} 7 | {\f4\fswiss\fcharset161\fprq2 Helvetica;} 8 | {\f5\fswiss\fcharset161\fprq2 Calibri;} 9 | {\f6\froman\fcharset161\fprq2 Georgia;} 10 | {\f7\ffroman\fcharset161\fprq2 Cambria;} 11 | {\f8\fmodern\fcharset161\fprq2 Courier New;} 12 | {\f9\ftech\fcharset161\fprq2 Symbol;} 13 | } 14 | 15 | 16 | \paperw12240\paperh15840 17 | 18 | \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 19 | 20 | 21 | 22 | 23 | \trowd\trgaph108\trleft0\trqc 24 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx3857 25 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7286 26 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 27 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Pairwise Comparison}\cell 28 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Difference in LS Mean (95% CI){\super a}}\cell 29 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p-Value}\cell 30 | \intbl\row\pard 31 | \trowd\trgaph108\trleft0\trqc 32 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx3857 33 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7286 34 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 35 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline Low Dose - Placebo}\cell 36 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.17 (-0.65, 0.30)}\cell 37 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.757}\cell 38 | \intbl\row\pard 39 | \trowd\trgaph108\trleft0\trqc 40 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx3857 41 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx7286 42 | \clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 43 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Xanomeline High Dose - Placebo}\cell 44 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.33 (-0.16, 0.82)}\cell 45 | \pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.381}\cell 46 | \intbl\row\pard 47 | 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /tlf/tlf_km.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tlf_km.pdf -------------------------------------------------------------------------------- /tlf/tlf_spec_ae.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elong0527/r4csr/2482f9da6525a7bcc54219846ab857c90b676fbc/tlf/tlf_spec_ae.pdf -------------------------------------------------------------------------------- /validation-tracker.tsv: -------------------------------------------------------------------------------- 1 | count_by 3 Alice C Alice C Bob C 2 | fmt_ci 3 Alice C Alice C Carol C 3 | fmt_est 3 Alice C Alice C Bob C 4 | fmt_num 3 Alice C Alice C Carol C 5 | fmt_pval 3 Alice C Alice C Dave C 6 | tlf-01-disposition.Rmd 3 Bob C Bob C Carol I 7 | tlf-02-population.Rmd 3 Carol C Carol C Dave I 8 | tlf-03-baseline.Rmd 3 Dave C Dave C Bob C 9 | tlf-04-efficacy.Rmd 3 Alice C Alice C Carol C 10 | tlf-05-ae-summary.Rmd 3 Bob C Bob C Dave I 11 | tlf-06-ae-spec.Rmd 3 Carol C Carol C Bob C 12 | --------------------------------------------------------------------------------