Skip to content

Commit

Permalink
Merge pull request #71 from openpharma/mmrm_comparison
Browse files Browse the repository at this point in the history
New vignette: exemplary comparison of Bayesian and frequentist MMRM fits
  • Loading branch information
wlandau authored Nov 14, 2023
2 parents 1652e71 + 6fb042a commit fe8f4d6
Show file tree
Hide file tree
Showing 9 changed files with 577 additions and 58 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^\.lintr$
^_pkgdown\.yml$
^docs$
^data-raw$
77 changes: 28 additions & 49 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,56 +1,29 @@
Package: brms.mmrm
Title: Bayesian MMRMs using 'brms'
Description: The mixed model for repeated measures (MMRM) is a
popular model for longitudinal clinical trial data with
continuous endpoints, and 'brms' is a powerful and versatile
package for fitting Bayesian regression models.
The 'brms.mmrm' R package leverages 'brms' to run MMRMs, and
it supports a simplified interfaced to reduce difficulty
and align with the best practices of the life sciences.
References: Bürkner (2017) <doi:10.18637/jss.v080.i01>,
Mallinckrodt (2008) <doi:10.1177/009286150804200402>.
Version: 0.0.2.9001
Authors@R: c(
person(c("William", "Michael"), "Landau", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-1878-3253")),
person("Kevin", "Kunzmann", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-1140-7143")),
person("Yoni", "Sidi", , "[email protected]", role = "aut"),
person("Christian", "Stock", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-3493-3234")),
person(, "Eli Lilly and Company", role = c("cph", "fnd")),
person("Boehringer Ingelheim Pharma GmbH & Co. KG", role = c("cph", "fnd"))
)
Description: The mixed model for repeated measures (MMRM) is a popular
model for longitudinal clinical trial data with continuous endpoints,
and 'brms' is a powerful and versatile package for fitting Bayesian
regression models. The 'brms.mmrm' R package leverages 'brms' to run
MMRMs, and it supports a simplified interfaced to reduce difficulty
and align with the best practices of the life sciences. References:
Bürkner (2017) <doi:10.18637/jss.v080.i01>, Mallinckrodt (2008)
<doi:10.1177/009286150804200402>.
License: MIT + file LICENSE
URL:
https://openpharma.github.io/brms.mmrm/,
URL: https://openpharma.github.io/brms.mmrm/,
https://github.com/openpharma/brms.mmrm
BugReports: https://github.com/openpharma/brms.mmrm/issues
Authors@R: c(
person(
given = c("William", "Michael"),
family = "Landau",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0003-1878-3253")
),
person(
given = "Kevin",
family = "Kunzmann",
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0002-1140-7143")
),
person(
given = "Yoni",
family = "Sidi",
role = "aut",
email = "[email protected]"
),
person(
given = "Christian",
family = "Stock",
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0002-3493-3234")
),
person(
family = "Eli Lilly and Company",
role = c("cph", "fnd")
),
person(
"Boehringer Ingelheim Pharma GmbH & Co. KG",
role = c("cph", "fnd")
))
Depends:
R (>= 4.0.0)
Imports:
Expand All @@ -73,18 +46,24 @@ Imports:
zoo
Suggests:
BH,
gt,
gtsummary,
knitr (>= 1.30),
markdown (>= 1.1),
mmrm,
parallel,
Rcpp,
RcppEigen,
RcppParallel,
rmarkdown (>= 2.4),
rstan,
StanHeaders,
testthat (>= 3.0.0)
VignetteBuilder:
knitr
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
VignetteBuilder: knitr
Config/testthat/edition: 3
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
LazyData: true
10 changes: 6 additions & 4 deletions R/brm_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
#' it supports a simplified interfaced to reduce difficulty
#' and align with the best practices of the life sciences.
#' @references
#' * Paul-Christian Bürkner (2017). brms: An R Package for Bayesian
#' * Bürkner PC (2017). brms: An R Package for Bayesian
#' Multilevel Models Using Stan.
#'. Journal of Statistical Software, 80(1), 1-28.
#'. J Stat Softw, 80(1), 1-28.
#' doi:10.18637/jss.v080.i01
#' * Mallinckrodt, C.H., Lane, P.W., Schnell, D. et al.
#' * Mallinckrodt CH, Lane PW, Schnell D, et al (2008).
#' Recommendations for the Primary Analysis of Continuous Endpoints
#' in Longitudinal Clinical Trials.
#' Ther Innov Regul Sci 42, 303–319 (2008).
#' Ther Innov Regul Sci, 42, 303–319.
#' doi:10.1177/009286150804200402
#' * Mallinckrodt C and Lipkovich I (2017). Analyzing Longitudinal Trial
#' Data -- A Practical Guide. Chapman `&amp;` Hall/ CRC Biostatistics Series.
#' @family help
#' @importFrom brms brm brmsformula get_prior prior unstr
#' @importFrom coda as.mcmc
Expand Down
189 changes: 189 additions & 0 deletions inst/asa.csl
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<info>
<title>American Statistical Association</title>
<title-short>ASA</title-short>
<id>http://www.zotero.org/styles/american-statistical-association</id>
<link href="http://www.zotero.org/styles/american-statistical-association" rel="self"/>
<link href="http://www.zotero.org/styles/american-society-of-civil-engineers" rel="template"/>
<link href="http://amstat.tfjournals.com/asa-style-guide/" rel="documentation"/>
<author>
<name>Patrick O'Brien</name>
</author>
<category citation-format="author-date"/>
<category field="math"/>
<summary>A style for the American Statistical Association used for all their journals.</summary>
<updated>2018-04-18T12:41:55+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<macro name="container-contributors">
<choose>
<if type="chapter paper-conference" match="any">
<names variable="editor translator" delimiter=", ">
<label form="short"/>
<name prefix=" " and="text" initialize-with=". "/>
</names>
</if>
</choose>
</macro>
<macro name="secondary-contributors">
<choose>
<if type="chapter paper-conference" match="none">
<names variable="editor translator" delimiter=", " prefix=" (" suffix=")">
<name and="text" initialize-with=". " delimiter=", "/>
<label form="short" prefix=", "/>
</names>
</if>
</choose>
</macro>
<macro name="author">
<names variable="author">
<name name-as-sort-order="all" and="text" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="always"/>
<label form="short" prefix=" (" suffix=")"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="title"/>
</substitute>
</names>
</macro>
<macro name="author-short">
<names variable="author">
<name form="short" and="text" delimiter=", " initialize-with=". "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<text variable="title" form="short" font-style="italic"/>
</if>
<else>
<text variable="title" form="short" quotes="true"/>
</else>
</choose>
</substitute>
</names>
</macro>
<macro name="title">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<text variable="title" font-style="italic"/>
</if>
<else>
<text variable="title" quotes="true"/>
</else>
</choose>
</macro>
<macro name="publisher">
<text variable="genre" suffix=", "/>
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</macro>
<macro name="issued">
<choose>
<if variable="issued">
<group prefix=" (" suffix="),">
<date variable="issued">
<date-part name="year"/>
</date>
</group>
</if>
<else>
<text prefix=" (" term="no date" suffix=")." form="short"/>
</else>
</choose>
</macro>
<macro name="issued-year">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year"/>
</date>
</if>
<else>
<text term="no date" form="short"/>
</else>
</choose>
</macro>
<macro name="locators">
<choose>
<if type="article-journal article-magazine article-newspaper" match="any">
<group delimiter=", ">
<text variable="volume"/>
<text variable="page"/>
</group>
</if>
<else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
<group delimiter=" ">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
</else-if>
<else-if type="webpage">
<group>
<text term="available at" text-case="capitalize-first"/>
<text variable="URL"/>
</group>
</else-if>
</choose>
</macro>
<macro name="citation-locator">
<group>
<label variable="locator" form="short"/>
<text variable="locator" prefix=" "/>
</group>
</macro>
<macro name="container-title">
<choose>
<if type="chapter paper-conference" match="any">
<group delimiter=" ">
<text term="in"/>
<text variable="container-title" font-style="italic"/>
</group>
</if>
<else>
<text variable="container-title" font-style="italic"/>
</else>
</choose>
</macro>
<macro name="access">
<text variable="DOI" prefix="https://doi.org/"/>
</macro>
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year-suffix">
<sort>
<key macro="author"/>
<key variable="issued"/>
</sort>
<layout prefix="(" suffix=")" delimiter="; ">
<group delimiter=" ">
<text macro="author-short"/>
<text macro="issued-year"/>
</group>
<text macro="citation-locator" prefix=","/>
</layout>
</citation>
<bibliography hanging-indent="true" entry-spacing="0">
<sort>
<key macro="author"/>
<key variable="issued"/>
</sort>
<layout suffix=".">
<text macro="author"/>
<text macro="issued" suffix=" "/>
<group delimiter=", ">
<text macro="title"/>
<group delimiter=", ">
<text macro="container-title"/>
<text variable="collection-title"/>
<text macro="container-contributors"/>
<text macro="secondary-contributors"/>
<text macro="publisher"/>
<text macro="locators"/>
</group>
</group>
<text macro="access" prefix=". "/>
</layout>
</bibliography>
</style>
File renamed without changes.
10 changes: 6 additions & 4 deletions man/brms.mmrm-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fe8f4d6

Please sign in to comment.