Binary files /tmp/tmpg6_BnW/hlrDA6Nq5i/altmeta-3.2/build/partial.rdb and /tmp/tmpg6_BnW/fZdWCS0X0P/altmeta-3.3/build/partial.rdb differ Binary files /tmp/tmpg6_BnW/hlrDA6Nq5i/altmeta-3.2/data/dat.baker.rda and /tmp/tmpg6_BnW/fZdWCS0X0P/altmeta-3.3/data/dat.baker.rda differ diff -Nru altmeta-3.2/debian/changelog altmeta-3.3/debian/changelog --- altmeta-3.2/debian/changelog 2020-11-01 05:06:01.000000000 +0000 +++ altmeta-3.3/debian/changelog 2021-03-16 18:53:37.000000000 +0000 @@ -1,15 +1,22 @@ -altmeta (3.2-1cran1.1804.0) bionic; urgency=medium +altmeta (3.3-1cran1.1804.0) bionic; urgency=medium * Compilation for Ubuntu 18.04.5 LTS * Build for c2d4u for R 3.5.0 - -- Michael Rutter Sun, 01 Nov 2020 05:06:01 +0000 + -- Michael Rutter Tue, 16 Mar 2021 18:53:37 +0000 + +altmeta (3.3-1cran1) testing; urgency=low + + * cran2deb svn: 362M with DB version 1. + + -- cran2deb4ubuntu Tue, 16 Mar 2021 11:39:51 -0400 + altmeta (3.2-1cran1) testing; urgency=low * cran2deb svn: 362M with DB version 1. - -- cran2deb4ubuntu Sat, 31 Oct 2020 13:15:53 -0400 + -- cran2deb4ubuntu Sat, 31 Oct 2020 13:16:00 -0400 altmeta (3.1-1cran1) testing; urgency=low diff -Nru altmeta-3.2/debian/control altmeta-3.3/debian/control --- altmeta-3.2/debian/control 2020-10-31 17:15:53.000000000 +0000 +++ altmeta-3.3/debian/control 2021-03-16 15:39:51.000000000 +0000 @@ -28,10 +28,13 @@ ); - meta-analysis methods for synthesizing proportions (Lin and Chu, 2020 ); - models for multivariate - meta-analysis (Lin and Chu, 2018 ). + meta-analysis (Lin and Chu, 2018 ); - measures + of inconsistency degrees of freedom in Bayesian network meta-analysis + (Lin, 2020 ). . Author: Lifeng Lin [aut, cre] - (), Linyu Shi [ctb], Haitao Chu - [aut] () + (), Linyu Shi [ctb], Kristine + J. Rosenberger [ctb], Haitao Chu [aut] + () . Maintainer: Lifeng Lin diff -Nru altmeta-3.2/debian/copyright altmeta-3.3/debian/copyright --- altmeta-3.2/debian/copyright 2020-10-31 17:15:53.000000000 +0000 +++ altmeta-3.3/debian/copyright 2021-03-16 15:39:51.000000000 +0000 @@ -2,9 +2,10 @@ automatically using cran2deb4ubuntu by cran2deb4ubuntu . -The original GNU R package is Copyright (C) 2020 Lifeng Lin [aut, cre] -(), Linyu Shi [ctb], Haitao Chu -[aut] () and possibly others. +The original GNU R package is Copyright (C) 2021 Lifeng Lin [aut, cre] +(), Linyu Shi [ctb], Kristine J. +Rosenberger [ctb], Haitao Chu [aut] +() and possibly others. The original GNU R package is maintained by Lifeng Lin and was obtained from: diff -Nru altmeta-3.2/DESCRIPTION altmeta-3.3/DESCRIPTION --- altmeta-3.2/DESCRIPTION 2020-10-31 07:30:05.000000000 +0000 +++ altmeta-3.3/DESCRIPTION 2021-03-15 13:10:02.000000000 +0000 @@ -1,13 +1,14 @@ Package: altmeta Type: Package Title: Alternative Meta-Analysis Methods -Version: 3.2 -Date: 2020-08-30 +Version: 3.3 +Date: 2021-03-14 Authors@R: c(person(given = "Lifeng", family = "Lin", role = c("aut", "cre"), email = "linl@stat.fsu.edu", comment = c(ORCID = "0000-0002-3562-9816")), person(given = "Linyu", family = "Shi", role = c("ctb")), + person(given = "Kristine J.", family = "Rosenberger", role = c("ctb")), person(given = "Haitao", family = "Chu", role = c("aut"), email = "chux0051@umn.edu", comment = c(ORCID = "0000-0003-0932-598X"))) @@ -30,12 +31,15 @@ - meta-analysis methods for synthesizing proportions (Lin and Chu, 2020 ); - models for multivariate meta-analysis - (Lin and Chu, 2018 ). + (Lin and Chu, 2018 ); + - measures of inconsistency degrees of freedom in Bayesian network meta-analysis + (Lin, 2020 ). License: GPL (>= 2) NeedsCompilation: no -Packaged: 2020-08-31 02:02:19 UTC; Lifeng Lin +Packaged: 2021-03-14 19:00:30 UTC; Lifeng Lin Author: Lifeng Lin [aut, cre] (), Linyu Shi [ctb], + Kristine J. Rosenberger [ctb], Haitao Chu [aut] () Repository: CRAN -Date/Publication: 2020-10-31 07:30:05 UTC +Date/Publication: 2021-03-15 13:10:02 UTC diff -Nru altmeta-3.2/man/dat.aex.Rd altmeta-3.3/man/dat.aex.Rd --- altmeta-3.2/man/dat.aex.Rd 2020-04-23 21:44:49.000000000 +0000 +++ altmeta-3.3/man/dat.aex.Rd 2020-09-14 18:33:32.000000000 +0000 @@ -18,4 +18,4 @@ \source{ Ismail I, Keating SE, Baker MK, Johnson NA (2012). "A systematic review and meta-analysis of the effect of aerobic vs.{\sspace}resistance exercise training on visceral fat." \emph{Obesity Reviews}, \bold{13}(1), 68--91. <\doi{10.1111/j.1467-789X.2011.00931.x}> } -\keyword{datasets} +\keyword{dataset} diff -Nru altmeta-3.2/man/dat.annane.Rd altmeta-3.3/man/dat.annane.Rd --- altmeta-3.2/man/dat.annane.Rd 2020-04-24 01:25:41.000000000 +0000 +++ altmeta-3.3/man/dat.annane.Rd 2020-09-14 18:33:39.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Annane D, Bellissant E, Bollaert PE, Briegel J, Keh D, Kupfer Y (2015). "Corticosteroids for treating sepsis." \emph{Cochrane Database of Systematic Reviews}, \bold{12}, Art.{\sspace}No.: CD002243. <\doi{10.1002/14651858.CD002243.pub3}> } -\keyword{datasets} +\keyword{dataset} diff -Nru altmeta-3.2/man/dat.baker.Rd altmeta-3.3/man/dat.baker.Rd --- altmeta-3.2/man/dat.baker.Rd 1970-01-01 00:00:00.000000000 +0000 +++ altmeta-3.3/man/dat.baker.Rd 2020-09-14 19:58:28.000000000 +0000 @@ -0,0 +1,26 @@ +\name{dat.baker} +\alias{dat.baker} +\docType{data} +\title{ +A Network Meta-Analysis on Effects of Pharmacologic Treatments for Chronic Obstructive Pulmonary Disease +} +\description{ +This dataset serves as an example of network meta-analysis with binary outcomes. +} +\usage{data("dat.baker")} +\format{ + A dataset of network meta-analysis with binary outcomes, containing 38 studies and 5 treatments. + \describe{ + \item{\code{sid}}{study IDs.} + \item{\code{tid}}{treatment IDs.} + \item{\code{r}}{event counts.} + \item{\code{n}}{sample sizes.} + } +} +\details{ +Treatment IDs represent: 1) placebo; 2) inhaled corticosteroid; 3) inhaled corticosteroid + long-acting \eqn{\beta_2}-agonist; 4) long-acting \eqn{\beta_2}-agonist; and 5) tiotropium. +} +\source{ +Baker WL, Baker EL, Coleman CI (2009). "Pharmacologic treatments for chronic obstructive pulmonary disease: a mixed-treatment comparison meta-analysis." \emph{Pharmacotherapy}, \bold{29}(8), 891--905. <\doi{10.1592/phco.29.8.891}> +} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.barlow.Rd altmeta-3.3/man/dat.barlow.Rd --- altmeta-3.2/man/dat.barlow.Rd 2020-04-24 01:25:46.000000000 +0000 +++ altmeta-3.3/man/dat.barlow.Rd 2020-09-14 18:33:47.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Barlow J, Smailagic N, Huband N, Roloff V, Bennett C (2014). "Group-based parent training programmes for improving parental psychosocial health." \emph{Cochrane Database of Systematic Reviews}, \bold{5}, Art.{\sspace}No.: CD002020. <\doi{10.1002/14651858.CD002020.pub4}> } -\keyword{datasets} +\keyword{dataset} diff -Nru altmeta-3.2/man/dat.beck17.Rd altmeta-3.3/man/dat.beck17.Rd --- altmeta-3.2/man/dat.beck17.Rd 2020-04-24 01:28:42.000000000 +0000 +++ altmeta-3.3/man/dat.beck17.Rd 2020-09-14 18:33:51.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Rotenstein LS, Ramos MA, Torre M, Segal JB, Peluso MJ, Guille C, Sen S, Mata DA (2016). "Prevalence of depression, depressive symptoms, and suicidal ideation among medical students: a systematic review and meta-analysis." \emph{JAMA}, \bold{316}(21), 2214--2236. <\doi{10.1001/jama.2016.17324}> } -\keyword{datasets} +\keyword{dataset} diff -Nru altmeta-3.2/man/dat.bellamy.Rd altmeta-3.3/man/dat.bellamy.Rd --- altmeta-3.2/man/dat.bellamy.Rd 2020-08-24 18:35:23.000000000 +0000 +++ altmeta-3.3/man/dat.bellamy.Rd 2020-09-14 18:33:57.000000000 +0000 @@ -20,4 +20,4 @@ \source{ Bellamy L, Casas JP, Hingorani AD, Williams D (2009). "Type 2 diabetes mellitus after gestational diabetes: a systematic review and meta-analysis." \emph{Lancet}, \bold{373}(9677), 1773--1779. <\doi{10.1016/S0140-6736(09)60731-5}> } -\keyword{datasets} +\keyword{dataset} diff -Nru altmeta-3.2/man/dat.butters.Rd altmeta-3.3/man/dat.butters.Rd --- altmeta-3.2/man/dat.butters.Rd 2020-04-24 01:25:54.000000000 +0000 +++ altmeta-3.3/man/dat.butters.Rd 2020-09-14 18:34:02.000000000 +0000 @@ -23,4 +23,4 @@ \source{ Butters DJ, Ghersi D, Wilcken N, Kirk SJ, Mallon PT (2010). "Addition of drug/s to a chemotherapy regimen for metastatic breast cancer." \emph{Cochrane Database of Systematic Reviews}, \bold{11}, Art.{\sspace}No.: CD003368. <\doi{10.1002/14651858.CD003368.pub3}> } -\keyword{datasets} +\keyword{dataset} diff -Nru altmeta-3.2/man/dat.chor.Rd altmeta-3.3/man/dat.chor.Rd --- altmeta-3.2/man/dat.chor.Rd 2020-04-24 01:28:13.000000000 +0000 +++ altmeta-3.3/man/dat.chor.Rd 2020-09-14 18:34:09.000000000 +0000 @@ -18,4 +18,4 @@ \source{ Woodd SL, Montoya A, Barreix M, Pi L, Calvert C, Rehman AM, Chou D, Campbell OMR (2019). "Incidence of maternal peripartum infection: a systematic review and meta-analysis." \emph{PLOS Medicine}, \bold{16}(12), e1002984. <\doi{10.1371/journal.pmed.1002984}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.ducharme.Rd altmeta-3.3/man/dat.ducharme.Rd --- altmeta-3.2/man/dat.ducharme.Rd 2020-07-23 18:45:20.000000000 +0000 +++ altmeta-3.3/man/dat.ducharme.Rd 2020-09-14 18:34:14.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Ducharme FM, Ni Chroinin M, Greenstone I, Lasserson TJ (2010). "Addition of long-acting beta2-agonists to inhaled corticosteroids versus same dose inhaled corticosteroids for chronic asthma in adults and children." \emph{Cochrane Database of Systematic Reviews}, \bold{5}, Art.{\sspace}No.: CD005535. <\doi{10.1002/14651858.CD005535.pub2}> } -\keyword{datasets} \ No newline at end of file +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.fib.Rd altmeta-3.3/man/dat.fib.Rd --- altmeta-3.2/man/dat.fib.Rd 2020-04-23 21:45:34.000000000 +0000 +++ altmeta-3.3/man/dat.fib.Rd 2020-09-14 18:34:20.000000000 +0000 @@ -21,4 +21,4 @@ Fibrinogen Studies Collaboration (2005). "Plasma fibrinogen level and the risk of major cardiovascular diseases and nonvascular mortality: an individual participant meta-analysis." \emph{JAMA}, \bold{294}(14), 1799--1809. <\doi{10.1001/jama.294.14.1799}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.ha.Rd altmeta-3.3/man/dat.ha.Rd --- altmeta-3.2/man/dat.ha.Rd 2020-04-24 01:32:03.000000000 +0000 +++ altmeta-3.3/man/dat.ha.Rd 2020-09-14 18:34:25.000000000 +0000 @@ -18,4 +18,4 @@ \source{ Hrobjartsson A, Gotzsche PC (2010). "Placebo interventions for all clinical conditions." \emph{Cochrane Database of Systematic Reviews}, \bold{1}. Art.{\sspace}No.: CD003974. <\doi{10.1002/14651858.CD003974.pub3}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.henry.Rd altmeta-3.3/man/dat.henry.Rd --- altmeta-3.2/man/dat.henry.Rd 2020-07-23 16:00:07.000000000 +0000 +++ altmeta-3.3/man/dat.henry.Rd 2020-09-14 18:34:31.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Henry DA, Carless PA, Moxey AJ, O'Connell, Stokes BJ, Fergusson DA, Ker K (2011). "Anti-fibrinolytic use for minimising perioperative allogeneic blood transfusion." \emph{Cochrane Database of Systematic Reviews}, \bold{1}, Art.{\sspace}No.: CD001886. <\doi{10.1002/14651858.CD001886.pub3}> } -\keyword{datasets} \ No newline at end of file +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.hipfrac.Rd altmeta-3.3/man/dat.hipfrac.Rd --- altmeta-3.2/man/dat.hipfrac.Rd 2020-04-24 01:31:37.000000000 +0000 +++ altmeta-3.3/man/dat.hipfrac.Rd 2020-09-14 18:34:36.000000000 +0000 @@ -18,4 +18,4 @@ \source{ Haentjens P, Magaziner J, Colon-Emeric CS, Vanderschueren D, Milisen K, Velkeniers B, Boonen S (2010). "Meta-analysis: excess mortality after hip fracture among older women and men". \emph{Annals of Internal Medicine}, \bold{152}(6), 380--390. <\doi{10.7326/0003-4819-152-6-201003160-00008}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.kaner.Rd altmeta-3.3/man/dat.kaner.Rd --- altmeta-3.2/man/dat.kaner.Rd 2020-04-24 01:32:57.000000000 +0000 +++ altmeta-3.3/man/dat.kaner.Rd 2020-09-14 18:34:46.000000000 +0000 @@ -23,4 +23,4 @@ \source{ Kaner EF, Dickinson HO, Beyer FR, Campbell F, Schlesinger C, Heather N, Saunders JB, Burnand B, Pienaar ED (2007). "Effectiveness of brief alcohol interventions in primary care populations." \emph{Cochrane Database of Systematic Reviews}, \bold{2}, Art.{\sspace}No.: CD004148. <\doi{10.1002/14651858.CD004148.pub3}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.lcj.Rd altmeta-3.3/man/dat.lcj.Rd --- altmeta-3.2/man/dat.lcj.Rd 2020-04-24 01:33:40.000000000 +0000 +++ altmeta-3.3/man/dat.lcj.Rd 2020-09-14 18:34:51.000000000 +0000 @@ -18,4 +18,4 @@ \source{ Liu CJ, Latham NK (2009). "Progressive resistance strength training for improving physical function in older adults." \emph{Cochrane Database of Systematic Reviews}, \bold{3}. Art.{\sspace}No.: CD002759. <\doi{10.1002/14651858.CD002759.pub2}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.paige.Rd altmeta-3.3/man/dat.paige.Rd --- altmeta-3.2/man/dat.paige.Rd 2020-04-24 01:26:15.000000000 +0000 +++ altmeta-3.3/man/dat.paige.Rd 2020-09-14 18:34:56.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Paige NM, Miake-Lye IM, Booth MS, Beroes JM, Mardian AS, Dougherty P, Branson R, Tang B, Morton SC, Shekelle PG (2017). "Association of spinal manipulative therapy with clinical benefit and harm for acute low back pain: systematic review and meta-analysis." \emph{JAMA}, \bold{317}(14), 1451--1460. <\doi{10.1001/jama.2017.3086}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.plourde.Rd altmeta-3.3/man/dat.plourde.Rd --- altmeta-3.2/man/dat.plourde.Rd 2020-04-24 01:26:20.000000000 +0000 +++ altmeta-3.3/man/dat.plourde.Rd 2020-09-14 18:35:02.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Plourde G, Pancholy SB, Nolan J, Jolly S, Rao SV, Amhed I, Bangalore S, Patel T, Dahm JB, Bertrand OF (2015). "Radiation exposure in relation to the arterial access site used for diagnostic coronary angiography and percutaneous coronary intervention: a systematic review and meta-analysis." \emph{Lancet}, \bold{386}(10009), 2192--2203. <\doi{10.1016/S0140-6736(15)00305-0}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.poole.Rd altmeta-3.3/man/dat.poole.Rd --- altmeta-3.2/man/dat.poole.Rd 2020-07-23 16:01:31.000000000 +0000 +++ altmeta-3.3/man/dat.poole.Rd 2020-09-14 18:35:06.000000000 +0000 @@ -20,4 +20,4 @@ \source{ Poole P, Chong J, Cates CJ (2015). "Mucolytic agents versus placebo for chronic bronchitis or chronic obstructive pulmonary disease." \emph{Cochrane Database of Systematic Reviews}, \bold{7}, Art.{\sspace}No.: CD001287. <\doi{10.1002/14651858.CD001287.pub5}> } -\keyword{datasets} \ No newline at end of file +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.pte.Rd altmeta-3.3/man/dat.pte.Rd --- altmeta-3.2/man/dat.pte.Rd 2020-04-24 01:36:00.000000000 +0000 +++ altmeta-3.3/man/dat.pte.Rd 2020-09-14 18:35:12.000000000 +0000 @@ -18,4 +18,4 @@ \source{ Serghiou S, Patel CJ, Tan YY, Koay P, Ioannidis JPA (2016). "Field-wide meta-analyses of observational associations can map selective availability of risk factors and the impact of model specifications." \emph{Journal of Clinical Epidemiology}, \bold{71}, 58--67. <\doi{10.1016/j.jclinepi.2015.09.004}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.scheidler.Rd altmeta-3.3/man/dat.scheidler.Rd --- altmeta-3.2/man/dat.scheidler.Rd 2020-08-30 19:09:01.000000000 +0000 +++ altmeta-3.3/man/dat.scheidler.Rd 2020-09-14 18:35:18.000000000 +0000 @@ -21,4 +21,4 @@ \source{ Scheidler J, Hricak H, Yu KK, Subak L, Segal MR (1997). "Radiological evaluation of lymph node metastases in patients with cervical cancer: a meta-analysis." \emph{JAMA}, \bold{278}(13), 1096--1101. <\doi{10.1001/jama.1997.03550130070040}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.slf.Rd altmeta-3.3/man/dat.slf.Rd --- altmeta-3.2/man/dat.slf.Rd 2020-04-24 01:37:19.000000000 +0000 +++ altmeta-3.3/man/dat.slf.Rd 2020-09-14 18:35:24.000000000 +0000 @@ -18,4 +18,4 @@ \source{ Stead LF, Perera R, Bullen C, Mant D, Hartmann-Boyce J, Cahill K, Lancaster T (2012). "Nicotine replacement therapy for smoking cessation." \emph{Cochrane Database of Systematic Reviews}, \bold{11}. Art.{\sspace}No.: CD000146. <\doi{10.1002/14651858.CD000146.pub4}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.smith.Rd altmeta-3.3/man/dat.smith.Rd --- altmeta-3.2/man/dat.smith.Rd 2020-08-30 01:28:50.000000000 +0000 +++ altmeta-3.3/man/dat.smith.Rd 2020-09-14 18:35:30.000000000 +0000 @@ -20,4 +20,4 @@ \source{ Smith TO, Back T, Toms AP, Hing CB (2011). "Diagnostic accuracy of ultrasound for rotator cuff tears in adults: a systematic review and meta-analysis." \emph{Clinical Radiology}, \bold{66}(11), 1036--1048. <\doi{10.1016/j.crad.2011.05.007}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.whiting.Rd altmeta-3.3/man/dat.whiting.Rd --- altmeta-3.2/man/dat.whiting.Rd 2020-04-24 01:37:38.000000000 +0000 +++ altmeta-3.3/man/dat.whiting.Rd 2020-09-14 18:35:37.000000000 +0000 @@ -25,4 +25,4 @@ \source{ Whiting PF, Wolff RF, Deshpande S, Di Nisio M, Duffy S, Hernandez AV, Keurentjes JC, Lang S, Misso K, Ryder S, Schmidlkofer S, Westwood M, Kleijnen J (2015). "Cannabinoids for medical use: a systematic review and meta-analysis." \emph{JAMA}, \bold{313}(24), 2456--2473. <\doi{10.1001/jama.2015.6358}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/dat.williams.Rd altmeta-3.3/man/dat.williams.Rd --- altmeta-3.2/man/dat.williams.Rd 2020-04-24 01:26:35.000000000 +0000 +++ altmeta-3.3/man/dat.williams.Rd 2020-09-14 18:35:43.000000000 +0000 @@ -23,4 +23,4 @@ \source{ Williams T, Hattingh CJ, Kariuki CM, Tromp SA, van Balkom AJ, Ipser JC, Stein DJ (2017). "Pharmacotherapy for social anxiety disorder (SAnD)." \emph{Cochrane Database of Systematic Reviews}, \bold{10}, Art.{\sspace}No.: CD001206. <\doi{10.1002/14651858.CD001206.pub3}> } -\keyword{datasets} +\keyword{dataset} \ No newline at end of file diff -Nru altmeta-3.2/man/meta.dt.Rd altmeta-3.3/man/meta.dt.Rd --- altmeta-3.2/man/meta.dt.Rd 2020-08-30 21:43:57.000000000 +0000 +++ altmeta-3.3/man/meta.dt.Rd 2021-03-14 18:42:16.000000000 +0000 @@ -76,9 +76,9 @@ Zhang H, Lu N, Feng C, Thurston SW, Xia Y, Zhu L, Tu XM (2011). "On fitting generalized linear mixed-effects models for binary responses using different statistical packages." \emph{Statistics in Medicine}, \bold{30}(20), 2562--2572. <\doi{10.1002/sim.4265}> } -%%\author{ -%% ~~who you are~~ -%%} +\author{ +Lifeng Lin, Kristine J.{\sspace}Rosenberger +} \note{ The original articles by Reitsma et al.\sspace(2005) and Chu and Cole (2006) used SAS to implement (generalized) linear mixed models (specifically, \code{PROC MIXED} and \code{PROC NLMIXED}); this function imports \code{\link[metafor]{rma.mv}} from the package \pkg{metafor} and \code{\link[lme4]{glmer}} from the package \pkg{lme4} for implementing these models. The estimation approaches adopted in SAS and the R packages \pkg{metafor} and \pkg{lme4} may differ, which may impact the results. See, for example, Zhang et al.\sspace(2011). } diff -Nru altmeta-3.2/man/nma.icdf.Rd altmeta-3.3/man/nma.icdf.Rd --- altmeta-3.2/man/nma.icdf.Rd 1970-01-01 00:00:00.000000000 +0000 +++ altmeta-3.3/man/nma.icdf.Rd 2021-03-14 18:40:22.000000000 +0000 @@ -0,0 +1,105 @@ +\name{nma.icdf} +\alias{nma.icdf} +\title{ +Evidence Inconsistency Degrees of Freedom in Bayesian Network Meta-Analysis +} +\description{ +Calculates evidence inconsistency degrees of freedom (ICDF) in Bayesian network meta-analysis with binary outcomes. +} +\usage{ +nma.icdf(sid, tid, r, n, data, type = c("la", "fe", "re"), + n.adapt = 1000, n.chains = 3, n.burnin = 5000, n.iter = 20000, + n.thin = 2, traceplot = FALSE, nma.name = NULL, seed = 1234) +} +\arguments{ + \item{sid}{ + a vector specifying the study IDs. +} + \item{tid}{ + a vector specifying the treatment IDs. +} + \item{r}{ + a numeric vector specifying the event counts. +} + \item{n}{ + a numeric vector specifying the sample sizes. +} + \item{data}{ + an optional data frame containing the network meta-analysis dataset. If \code{data} is specified, the previous arguments, \code{sid}, \code{tid}, \code{r}, and \code{n}, should be specified as their corresponding column names in \code{data}. +} + \item{type}{ + a character string or a vector of character strings specifying the ICDF measures. It can be chosen from \code{"la"} (the Lu--Ades measure), \code{"fe"} (based on fixed-effects models), and \code{"re"} (based on random-effects models). +} + \item{n.adapt}{ + the number of iterations for adaptation in the Markov chain Monte Carlo (MCMC) algorithm. The default is 1,000. This argument and the following \code{n.chains}, \code{n.burnin}, \code{n.iter}, and \code{n.thin} are passed to the functions in the package \pkg{rjags}. +} + \item{n.chains}{ + the number of MCMC chains. The default is 3. +} + \item{n.burnin}{ + the number of iterations for burn-in period. The default is 5,000. +} + \item{n.iter}{ + the total number of iterations in each MCMC chain after the burn-in period. The default is 20,000. +} + \item{n.thin}{ + a positive integer specifying thinning rate. The default is 2. +} + \item{traceplot}{ + a logical value indicating whether to generate trace plots of network meta-analysis models for calculating the ICDF measures. It is only used when the argument \code{type} includes \code{"fe"} and/or \code{"re"}. +} + \item{nma.name}{ + a character string for specifying the name of the network meta-analysis, which will be used in the file names of the trace plots. It is only used when \code{traceplot} = \code{TRUE}. +} + \item{seed}{ + an integer for specifying the seed of the random number generation for reproducibility during the Markov chain Monte Carlo (MCMC) algorithm for performing Bayesian network meta-analysis models. +} +} +\details{ +Network meta-analysis frequenlty assumes that direct evidence is consistent with indirect evidence, but this consistency assumption may not hold in some cases. One may use the ICDF to assess the potential that a network meta-analysis might suffer from inconsistency. Suppose that a network meta-analysis compares a total of \eqn{K} treatments. When it contains two-arm studies only, Lu and Ades (2006) propose to measure the ICDF as +\deqn{ICDF^{LA} = T - K + 1,} +where \eqn{T} is the total number of treatment pairs that are directly compared in the treatment network. This measure is interpreted as the number of independent treatment loops. However, it may not be feasibly calculated when the network meta-analysis contains multi-arm studies. Multi-arm studies provide intrinsically consistent evidence and complicate the calculation of the ICDF. + +Alternatively, the ICDF may be measured as the difference between the effective numbers of parameters of the consistency and inconsistency models for network meta-analysis. The consistency model assumes evidence consistency in all treatment loops, and the inconsistency model treats the overall effect sizes of all direct treatment comparisons as separate, unrelated parameters (Dias et al., 2013). The effective number of parameters is frequently used to assess the complexity of Bayesian hierarchical models (Spiegelhalter et al., 2002). The effect measure is the (log) odds ratio in the models used in this function. Let \eqn{p_D^{FE,con}} and \eqn{p_D^{FE,incon}} be the effective numbers of parameters of the consistency and inconsistency models under the fixed-effects setting, and \eqn{p_D^{RE,con}} and \eqn{p_D^{RE,incon}} be those under the random-effects setting. The ICDF measures under the fixed-effects and random-effects settings are +\deqn{ICDF^{FE} = p_D^{FE,incon} - p_D^{FE,con};} +\deqn{ICDF^{RE} = p_D^{RE,incon} - p_D^{RE,con},} +respectively. See more details in Lin (2020). +} +\value{ +This function produces a list containing the following results: a table of the number of arms within studies and the corresponding counts of studies (\code{nstudy.trtarm}); the number of multi-arm studies (\code{nstudy.multi}); the set of treatments compared in each multi-arm study (\code{multi.trtarm}); the Lu--Ades ICDF measure (\code{icdf.la}); the ICDF measure based on the fixed-effects consistency and inconsistency models (\code{icdf.fe}); and the ICDF measure based on the random-effects consistency and inconsistency models (\code{icdf.re}). The Lu--Ades ICDF measure is \code{NA} (not available) in the presence of multi-arm studies, because multi-arm studies complicate the counting of independent treatment loops in generic network meta-analyses. When \code{traceplot} = \code{TRUE}, the trace plots will be saved in users' working directory. +} +\references{ +Dias S, Welton NJ, Sutton AJ, Caldwell DM, Lu G, Ades AE (2013). "Evidence synthesis for decision making 4: inconsistency in networks of evidence based on randomized controlled trials." \emph{Medical Decision Making}, \bold{33}(5), 641--656. <\doi{10.1177/0272989X12455847}> + +Lin L (2020). "Evidence inconsistency degrees of freedom in Bayesian network meta-analysis." \emph{Journal of Biopharmaceutical Statistics}, in press. <\doi{10.1080/10543406.2020.1852247}> + +Lu G, Ades AE (2006). "Assessing evidence inconsistency in mixed treatment comparisons." \emph{Journal of the American Statistical Association}, \bold{101}(474), 447--459. <\doi{10.1198/016214505000001302}> + +Spiegelhalter DJ, Best NG, Carlin BP, Van Der Linde A (2002). "Bayesian measures of model complexity and fit." \emph{Journal of the Royal Statistical Society, Series B (Statistical Methodology)}, \bold{64}(4), 583--639. <\doi{10.1111/1467-9868.00353}> +} +%%\author{ +%% ~~who you are~~ +%%} +%%\note{ +%% ~~further notes~~ +%%} + +%% ~Make other sections like Warning with \section{Warning }{....} ~ + +%%\seealso{ +%% ~~objects to See Also as \code{\link{help}}, ~~~ +%%} +\examples{ +\donttest{ +data("dat.baker") +## increase n.burnin (e.g., to 50000) and n.iter (e.g., to 200000) +## for better convergence of MCMC +out <- nma.icdf(sid, tid, r, n, data = dat.baker, + type = c("la", "fe", "re"), + n.adapt = 1000, n.chains = 3, n.burnin = 500, n.iter = 2000, + n.thin = 2, traceplot = FALSE, seed = 1234) +out +} +} +\keyword{multivariate meta-analysis} + diff -Nru altmeta-3.2/man/pb.bayesian.binary.Rd altmeta-3.3/man/pb.bayesian.binary.Rd --- altmeta-3.2/man/pb.bayesian.binary.Rd 2020-08-30 21:46:00.000000000 +0000 +++ altmeta-3.3/man/pb.bayesian.binary.Rd 2020-09-14 18:27:47.000000000 +0000 @@ -85,7 +85,7 @@ The Bayesian models are specified in Shi et al.\sspace(2020). The vague prior N(0, \eqn{10^4}) is used for the regression intercept and slope, and the uniform prior U(0, \code{upp.het}) and half-normal prior HN(\code{phi}) are used for standard deviation parameters. The half-normal priors may be preferred in meta-analyses with rare events or small sample sizes. } \value{ -This function returns a list containing estimates of regression slopes and their credible intervals with the specified significance level (\code{sig.level}) as well as MCMC posterior samples (if \code{coda} = \code{TRUE}). Each element name in this list is related to a certain publication bias method (e.g., \code{est.bay} and \code{ci.bay} represent the slope estimate and its credible interval based on the proposed Bayesian method). In addition, traceplots for the regression slope are drawn if \code{traceplot} = \code{TRUE}. +This function returns a list containing estimates of regression slopes and their credible intervals with the specified significance level (\code{sig.level}) as well as MCMC posterior samples (if \code{coda} = \code{TRUE}). Each element name in this list is related to a certain publication bias method (e.g., \code{est.bay} and \code{ci.bay} represent the slope estimate and its credible interval based on the proposed Bayesian method). In addition, trace plots for the regression slope are drawn if \code{traceplot} = \code{TRUE}. } \references{ Egger M, Davey Smith G, Schneider M, Minder C (1997). "Bias in meta-analysis detected by a simple, graphical test." \emph{BMJ}, \bold{315}(7109), 629--634. <\doi{10.1136/bmj.315.7109.629}> diff -Nru altmeta-3.2/MD5 altmeta-3.3/MD5 --- altmeta-3.2/MD5 2020-10-31 07:30:05.000000000 +0000 +++ altmeta-3.3/MD5 2021-03-15 13:10:02.000000000 +0000 @@ -1,12 +1,12 @@ -7fef793debe69d5547ab053ce38ff486 *DESCRIPTION -782d13e5974bc41cb90703555c9d229d *NAMESPACE +28b0f5a5512487eaca25d62faef67dd7 *DESCRIPTION +74c25eb9f6de1bf3bdd5679de24abef2 *NAMESPACE 00e7ab7ee18d1e864d928f11f956d93e *R/check.counts.R 4de9252157345752943f8f3c119ffc30 *R/find.counts.R c0d23f2f388f6b0e11fb65d196b6a59e *R/hypergeometric.R a2a2f52ecfc6749a8f08afac428d25c1 *R/maprop.glmm.R 94ba56bbc9d0a5ffdd6217b3964a869b *R/maprop.twostep.R 145ec75e561d719a4cf47d85771ee0f2 *R/meta.biv.R -b155925a0694cf5510d50339f164ff9f *R/meta.dt.R +7baaaaf54011b99c7d8c14efcb13dd33 *R/meta.dt.R 433d298cbf4670fa17562996888694a1 *R/metahet.R 3cda4438de737f4a9db0599c2088e435 *R/metahet.base.R 854a4f6b43aa58fbda2cb21330ec8bba *R/metaoutliers.R @@ -17,6 +17,11 @@ a0bf535c128208da8c703fde975e73f4 *R/mvma.hybrid.R b26ded306fd253df2ac3f58de6fab17b *R/mvma.hybrid.bayesian.R d4feb1d44141068be0e3437db245e3e9 *R/mvma.re.R +8a049de6f762a4eef6d688981ce4b001 *R/nma.fe.c.R +ff09c8d4194d4f7fbe38dadbac402318 *R/nma.fe.ic.R +07e203ded5cfccca4826f94fd7b8d0a0 *R/nma.icdf.R +1cad700b46d5ca89ebdd1b303658ff02 *R/nma.re.c.R +e049895e60013c13d1d49cbcbef782cd *R/nma.re.ic.R cc07a45149c92b29c339d579ab11874b *R/pb.as.rank.R 2cc2e8b4992e4f1d2cd78e7619f7091f *R/pb.as.reg.R cc9bea90bb57287280e2cf5c8dfabfd7 *R/pb.as.reg.het.R @@ -50,9 +55,10 @@ 6a6519577e2dedbff3b1e13a7d60c31c *R/tau2.m.solver.R 0fb792323e760ce800b754f82baad0db *R/tau2.r.solver.R 11d2b498925ec517fc526c87423b2dfb *R/tryCatch.W.E.R -06c0350bed121642d1ca2f2f1842902f *build/partial.rdb +23ea850b1531a7b310d716cff29f5248 *build/partial.rdb 2da3b192e0a5b8a7da0778eda50c9be2 *data/dat.aex.rda 1c0312fba005ba20009fbadd03f2d780 *data/dat.annane.rda +ee466b0ac8e82ee3660d760eed798ab1 *data/dat.baker.rda aeaa50c765b00b446ce98330e34bdad0 *data/dat.barlow.rda 10109092777a8b2a6f923df0d55642cb *data/dat.beck17.rda 1a76f32ea568fcf5343886ece96a506a *data/dat.bellamy.rda @@ -74,33 +80,34 @@ d9372744d3f7a3bbb334015a6a464297 *data/dat.smith.rda b98941abebe1b12ab9c1b4aa770601d5 *data/dat.whiting.rda 2e95280ff278571e335dc953f3b0c724 *data/dat.williams.rda -708d31192611864bad4f57cee426f817 *man/dat.aex.Rd -da5dc064fe3a79859285ee26d2882924 *man/dat.annane.Rd -1c8a17b1a6e33395c14965475d96ccc0 *man/dat.barlow.Rd -7320a2339def7b9e0ffda67af92bef79 *man/dat.beck17.Rd -3d2abb702da8526801c4d7cabd06ae42 *man/dat.bellamy.Rd -8acbb15f409dd6337d379b3525c680ac *man/dat.butters.Rd -de2ff8613a9077a8c8253532884dfa19 *man/dat.chor.Rd -d080de6ac6a12df13f9de45a42fb59d2 *man/dat.ducharme.Rd -b9ebe186da2c327344427e2416acfd15 *man/dat.fib.Rd -eeb5bbe4f428d5598af5bd29885d33a1 *man/dat.ha.Rd -62f76228a156cf71cab8b3f52ce6e138 *man/dat.henry.Rd -bdc841c147b4c7e2cd62d065a9556e7b *man/dat.hipfrac.Rd -af38c73f33339ff3910491c5f6daa5e2 *man/dat.kaner.Rd -7ad0fc3b3ec5a864ea0f517a25d9c531 *man/dat.lcj.Rd -94df2c4dd1399bf3031421c847933476 *man/dat.paige.Rd -fc3f1ffe173fb75dd28fe77cea2d3cff *man/dat.plourde.Rd -33e0c5733ec21bd745d6ba92d9192e68 *man/dat.poole.Rd -9670f444e29558f607715dd1d65d057f *man/dat.pte.Rd -5380497ed3acaced98bc8f0eb817fa88 *man/dat.scheidler.Rd -98f7fd4bd9f5e205ed4eed368869ab68 *man/dat.slf.Rd -04a2fa86d88ba41ad07e8ff4ef00965d *man/dat.smith.Rd -2184b55b3f24a21f659a005d5a1b8246 *man/dat.whiting.Rd -248c76bc26e982a87f58f4a3bdcbf8c7 *man/dat.williams.Rd +4cb17d29b2222acd9ca6a075804b09b5 *man/dat.aex.Rd +1e886ff5971606d8288ddde040b4e151 *man/dat.annane.Rd +6d9fe336419760a55db30baa655bdf37 *man/dat.baker.Rd +73ab0478edef19990a9522a7fd9772db *man/dat.barlow.Rd +a94e35213e7aeb28f9358de6b980b39b *man/dat.beck17.Rd +fe6f3e385eb88467b8f733fa7e938474 *man/dat.bellamy.Rd +c181698cf97146921618c0616eaf47ea *man/dat.butters.Rd +2323ee938a5d554e6f5afbea058dc474 *man/dat.chor.Rd +fe171c536c2ebca7376374c0428301d4 *man/dat.ducharme.Rd +041e40f2235535a41ada82d8a56c7b69 *man/dat.fib.Rd +32e9de2c4ad114a852ee15ccb54299a1 *man/dat.ha.Rd +95155753782d51c6715455309d555659 *man/dat.henry.Rd +cf57f568bf295ed4769dd2e14a3d739c *man/dat.hipfrac.Rd +830420a9597dc5cef665fb70c0004fa4 *man/dat.kaner.Rd +0aaa78b4d49fc13a856c6ce786453d55 *man/dat.lcj.Rd +81335d315f7aecbc0add73733a0bc77c *man/dat.paige.Rd +9d05f2931d66723c189b65b8c305a00b *man/dat.plourde.Rd +105e54f96eccb87a1475508cfd462167 *man/dat.poole.Rd +a5afeb783e62608fae693f7293a81a48 *man/dat.pte.Rd +f39a288de29ed6e54cb51dcb7004ff03 *man/dat.scheidler.Rd +7e8a1840e73d9aa68a00a5b12f7a77d6 *man/dat.slf.Rd +dd1350bb154a0bafedd7526f0b72070a *man/dat.smith.Rd +23af9724b7e107c84d5afecea25df131 *man/dat.whiting.Rd +99459f7e6ad03a0c5ab393c2cd0d32b1 *man/dat.williams.Rd 785963f0f92235a26c3add23cd775887 *man/maprop.glmm.Rd a9afa334ade4b5be732929fdf752850a *man/maprop.twostep.Rd d7f8ab943436df8ef16e86e779b25113 *man/meta.biv.Rd -da6dcd4bffaaba0c40b8c769b5f888d4 *man/meta.dt.Rd +4f337cc22d6885eb456479251c543486 *man/meta.dt.Rd 022b632e329b95ea6b11e70cdf904853 *man/metahet.Rd 7573a7714017f581c0741c0b6eb8a962 *man/metaoutliers.Rd b6ba4c18f6567b0847adf020f272185c *man/metapb.Rd @@ -108,7 +115,8 @@ e080f818862830c484f9ec4ca72fdb53 *man/mvma.bayesian.Rd c6139fc65cfa4375c66ba74a3a663ee9 *man/mvma.hybrid.Rd f3cb6e599e238df9071db2316a765969 *man/mvma.hybrid.bayesian.Rd -243309d9566ee406cae103a999bc57f9 *man/pb.bayesian.binary.Rd +e22ac385b0bf45dcf740d25ae559c25a *man/nma.icdf.Rd +8df419a993eb6ef1b71a23e95dae5d44 *man/pb.bayesian.binary.Rd e2c861e0fbad7e0b058a865494ed0f1f *man/pb.hybrid.binary.Rd 8786f3896861e7c04703f51958fda899 *man/pb.hybrid.generic.Rd b90d613a18df856f0d570095462819df *man/plot.meta.dt.Rd diff -Nru altmeta-3.2/NAMESPACE altmeta-3.3/NAMESPACE --- altmeta-3.2/NAMESPACE 2020-08-30 21:38:02.000000000 +0000 +++ altmeta-3.3/NAMESPACE 2020-09-14 19:46:09.000000000 +0000 @@ -2,7 +2,7 @@ S3method(plot, metaoutliers) S3method(print, meta.dt) -export(maprop.glmm, maprop.twostep, meta.biv, meta.dt, metahet, metaoutliers, metapb, mvma, mvma.bayesian, mvma.hybrid, mvma.hybrid.bayesian, pb.bayesian.binary, pb.hybrid.binary, pb.hybrid.generic, ssfunnel) +export(maprop.glmm, maprop.twostep, meta.biv, meta.dt, metahet, metaoutliers, metapb, mvma, mvma.bayesian, mvma.hybrid, mvma.hybrid.bayesian, nma.icdf, pb.bayesian.binary, pb.hybrid.binary, pb.hybrid.generic, ssfunnel) import("graphics", "rjags", "stats") diff -Nru altmeta-3.2/R/meta.dt.R altmeta-3.3/R/meta.dt.R --- altmeta-3.2/R/meta.dt.R 2020-08-31 01:20:26.000000000 +0000 +++ altmeta-3.3/R/meta.dt.R 2021-03-14 18:59:45.000000000 +0000 @@ -15,7 +15,7 @@ if(!is.element(method, c("s.roc", "biv.lmm", "biv.glmm"))){ stop("do not recognize the specified method.") } - + idx.allzero <- which(tp == 0 & fp == 0 & fn == 0 & tn == 0) if(length(idx.allzero) > 0){ tp <- tp[-idx.allzero] @@ -29,7 +29,44 @@ n.stu <- length(tp) sid <- rep(1:n.stu, each = 2) sens.id <- rep(c(1, 0), n.stu) - + + AUC_int <- function(roc){ + tryCatch( + { + AUC <- integrate(roc, lower = 0, upper = 1)$value + return(AUC) + }, + error=function(error_message) { + tryCatch( + { + AUC <- integrate(roc, lower = 0.0001, upper = 0.9999)$value + return(AUC) + }, + error=function(error_message) { + tryCatch( + { + AUC <- integrate(roc, lower = 0.001, upper = 0.999)$value + return(AUC) + }, + error=function(error_message) { + tryCatch( + { + AUC <- integrate(roc, lower = 0.01, upper = 0.99)$value + return(AUC) + }, + error=function(error_message) { + message("The estimated ROC is not integrable.") + return(0) + } + ) + } + ) + } + ) + } + ) + } + if(method == "s.roc"){ for(i in 1:n.stu){ if(tp[i] == 0 | fp[i] == 0 | fn[i] == 0 | tn[i] == 0){ @@ -48,7 +85,7 @@ D <- y1 + y2 S <- y1 - y2 V <- v1 + v2 - + lm.unwtd <- lm(D ~ S, ...) smry.unwtd <- summary(lm.unwtd) inter.unwtd <- smry.unwtd$coefficients[1,1] @@ -58,18 +95,18 @@ temp.coef <- c(1, mean(S)) logDOR.meanS.unwtd.var <- as.numeric(t(temp.coef) %*% vcov.unwtd %*% temp.coef) logDOR.meanS.unwtd.ci <- c(logDOR.meanS.unwtd - qnorm(1 - alpha/2)*sqrt(logDOR.meanS.unwtd.var), - logDOR.meanS.unwtd + qnorm(1 - alpha/2)*sqrt(logDOR.meanS.unwtd.var)) + logDOR.meanS.unwtd + qnorm(1 - alpha/2)*sqrt(logDOR.meanS.unwtd.var)) Q.unwtd <- 1/(1 + exp(-inter.unwtd/2)) inter.unwtd.ci <- c(inter.unwtd - qnorm(1 - alpha/2)*sqrt(vcov.unwtd[1,1]), - inter.unwtd + qnorm(1 - alpha/2)*sqrt(vcov.unwtd[1,1])) + inter.unwtd + qnorm(1 - alpha/2)*sqrt(vcov.unwtd[1,1])) Q.unwtd.ci <- 1/(1 + exp(-inter.unwtd.ci/2)) roc.curve.unwtd <- function(xval){ spec <- 1 - xval sens <- 1/(1 + exp(-inter.unwtd/(1 - slope.unwtd))*(spec/(1 - spec))^((1 + slope.unwtd)/(1 - slope.unwtd))) return(sens) } - AUC.unwtd <- integrate(roc.curve.unwtd, lower = 0, upper = 1)$value - + AUC.unwtd <- AUC_int(roc.curve.unwtd) + lm.wtd <- lm(D ~ S, weights = 1/V, ...) smry.wtd <- summary(lm.wtd) inter.wtd <- smry.wtd$coefficients[1,1] @@ -78,27 +115,27 @@ logDOR.meanS.wtd <- inter.wtd + slope.wtd*mean(S) logDOR.meanS.wtd.var <- as.numeric(t(temp.coef) %*% vcov.wtd %*% temp.coef) logDOR.meanS.wtd.ci <- c(logDOR.meanS.wtd - qnorm(1 - alpha/2)*sqrt(logDOR.meanS.wtd.var), - logDOR.meanS.wtd + qnorm(1 - alpha/2)*sqrt(logDOR.meanS.wtd.var)) + logDOR.meanS.wtd + qnorm(1 - alpha/2)*sqrt(logDOR.meanS.wtd.var)) Q.wtd <- 1/(1 + exp(-inter.wtd/2)) inter.wtd.ci <- c(inter.wtd - qnorm(1 - alpha/2)*sqrt(vcov.wtd[1,1]), - inter.wtd + qnorm(1 - alpha/2)*sqrt(vcov.wtd[1,1])) + inter.wtd + qnorm(1 - alpha/2)*sqrt(vcov.wtd[1,1])) Q.wtd.ci <- 1/(1 + exp(-inter.wtd.ci/2)) roc.curve.wtd <- function(xval){ spec <- 1 - xval sens <- 1/(1 + exp(-inter.wtd/(1 - slope.wtd))*(spec/(1 - spec))^((1 + slope.wtd)/(1 - slope.wtd))) return(sens) } - AUC.wtd <- integrate(roc.curve.wtd, lower = 0, upper = 1)$value - + AUC.wtd <- AUC_int(roc.curve.wtd) + out <- list(method = method, alpha = alpha, - inter.unwtd = inter.unwtd, slope.unwtd = slope.unwtd, vcov.unwtd = vcov.unwtd, - DOR.meanS.unwtd = exp(logDOR.meanS.unwtd), DOR.meanS.unwtd.ci = exp(logDOR.meanS.unwtd.ci), - Q.unwtd = Q.unwtd, Q.unwtd.ci = Q.unwtd.ci, AUC.unwtd = AUC.unwtd, - inter.wtd = inter.wtd, slope.wtd = slope.wtd, vcov.wtd = vcov.wtd, - DOR.meanS.wtd = exp(logDOR.meanS.wtd), DOR.meanS.wtd.ci = exp(logDOR.meanS.wtd.ci), - Q.wtd = Q.wtd, Q.wtd.ci = Q.wtd.ci, AUC.wtd = AUC.wtd, data = dat.ori) + inter.unwtd = inter.unwtd, slope.unwtd = slope.unwtd, vcov.unwtd = vcov.unwtd, + DOR.meanS.unwtd = exp(logDOR.meanS.unwtd), DOR.meanS.unwtd.ci = exp(logDOR.meanS.unwtd.ci), + Q.unwtd = Q.unwtd, Q.unwtd.ci = Q.unwtd.ci, AUC.unwtd = AUC.unwtd, + inter.wtd = inter.wtd, slope.wtd = slope.wtd, vcov.wtd = vcov.wtd, + DOR.meanS.wtd = exp(logDOR.meanS.wtd), DOR.meanS.wtd.ci = exp(logDOR.meanS.wtd.ci), + Q.wtd = Q.wtd, Q.wtd.ci = Q.wtd.ci, AUC.wtd = AUC.wtd, data = dat.ori) } - + if(is.element(method, c("biv.lmm", "biv.glmm"))){ if(method == "biv.lmm"){ for(i in 1:n.stu){ @@ -130,7 +167,7 @@ sig.spec <- sqrt(rslt$tau2[1]) rho <- rslt$rho } - + if(method == "biv.glmm"){ e <- c(rbind(tp, tn)) tot.p <- tp + fn @@ -138,29 +175,35 @@ tot <- c(rbind(tot.p, tot.n)) dat <- data.frame(sid = sid, sens.id = sens.id, spec.id = 1 - sens.id, e = e, tot = tot) rslt <- glmer(cbind(e, tot - e) ~ sens.id + spec.id - 1 + (sens.id + spec.id - 1 | sid), - data = dat, family = binomial(link = "logit"), ...) + data = dat, family = binomial(link = "logit"), ...) smry <- summary(rslt) mu.sens <- smry$coefficients[1,1] mu.spec <- smry$coefficients[2,1] mu.vcov <- matrix(as.numeric(smry$vcov), 2, 2) sig.sens <- attr(smry$varcor[[1]], "stddev")[1] + if (sig.sens == 0){ + sig.sens <- 0.0001 + } sig.spec <- attr(smry$varcor[[1]], "stddev")[2] rho <- attr(smry$varcor[[1]], "correlation")[1,2] + if (is.nan(rho)){ + rho <- 0 + } names(sig.sens) <- names(sig.spec) <- NULL } - + sens.overall <- 1/(1 + exp(-mu.sens)) mu.sens.ci <- c(mu.sens - qnorm(1 - alpha/2)*sqrt(mu.vcov[1,1]), - mu.sens + qnorm(1 - alpha/2)*sqrt(mu.vcov[1,1])) + mu.sens + qnorm(1 - alpha/2)*sqrt(mu.vcov[1,1])) sens.overall.ci <- 1/(1 + exp(-mu.sens.ci)) spec.overall <- 1/(1 + exp(-mu.spec)) mu.spec.ci <- c(mu.spec - qnorm(1 - alpha/2)*sqrt(mu.vcov[2,2]), - mu.spec + qnorm(1 - alpha/2)*sqrt(mu.vcov[2,2])) + mu.spec + qnorm(1 - alpha/2)*sqrt(mu.vcov[2,2])) spec.overall.ci <- 1/(1 + exp(-mu.spec.ci)) logDOR.overall <- mu.sens + mu.spec logDOR.overall.stderr <- sqrt(sum(mu.vcov)) logDOR.overall.ci <- c(logDOR.overall - qnorm(1 - alpha/2)*logDOR.overall.stderr, - logDOR.overall + qnorm(1 - alpha/2)*logDOR.overall.stderr) + logDOR.overall + qnorm(1 - alpha/2)*logDOR.overall.stderr) DOR.overall <- exp(logDOR.overall) DOR.overall.ci <- exp(logDOR.overall.ci) roc.curve <- function(xval){ @@ -170,16 +213,16 @@ sens <- 1/(1 + exp(-logit.sens)) return(sens) } - AUC <- integrate(roc.curve, lower = 0, upper = 1)$value - + AUC <- AUC_int(roc.curve) + out <- list(method = method, alpha = alpha, - sens.overall = sens.overall, sens.overall.ci = sens.overall.ci, - spec.overall = spec.overall, spec.overall.ci = spec.overall.ci, - DOR.overall = DOR.overall, DOR.overall.ci = DOR.overall.ci, AUC = AUC, - mu.sens = mu.sens, mu.spec = mu.spec, mu.vcov = mu.vcov, - sig.sens = sig.sens, sig.spec = sig.spec, rho = rho, data = dat.ori) + sens.overall = sens.overall, sens.overall.ci = sens.overall.ci, + spec.overall = spec.overall, spec.overall.ci = spec.overall.ci, + DOR.overall = DOR.overall, DOR.overall.ci = DOR.overall.ci, AUC = AUC, + mu.sens = mu.sens, mu.spec = mu.spec, mu.vcov = mu.vcov, + sig.sens = sig.sens, sig.spec = sig.spec, rho = rho, data = dat.ori) } - + class(out) <- "meta.dt" return(out) } diff -Nru altmeta-3.2/R/nma.fe.c.R altmeta-3.3/R/nma.fe.c.R --- altmeta-3.2/R/nma.fe.c.R 1970-01-01 00:00:00.000000000 +0000 +++ altmeta-3.3/R/nma.fe.c.R 2020-09-14 04:29:14.000000000 +0000 @@ -0,0 +1,36 @@ +## JAGS model for FE NMA with evidence consistency +nma.fe.c <- function(o){ +out <- " +model{ + for(i in 1:NS){ + mu[i] ~ dnorm(0, 0.0001) # vague priors for trial baselines + for(k in 1:na[i]){ + r[i,k] ~ dbin(p[i,t[i,k]], n[i,k]) # binomial likelihood + logit(p[i,t[i,k]]) <- mu[i] + md[i,t[i,k]] # model + rhat[i,k] <- p[i,t[i,k]]*n[i,k] # expected counts + dev[i,k] <- 2*(r[i,k]*(log(r[i,k]) - log(rhat[i,k])) + + (n[i,k] - r[i,k])*(log(n[i,k] - r[i,k]) - log(n[i,k] - rhat[i,k]))) + # deviance contribution + } + resdev[i] <- sum(dev[i,1:na[i]]) # residual deviance for this trial + md[i,t[i,1]] <- 0 + for(k in 2:na[i]){ + md[i,t[i,k]] <- d[t[i,k]] - d[t[i,1]] # LOR + } + } + totresdev <- sum(resdev[]) # total residual deviance + + d[1] <- 0 + for(k in 2:NT){ + d[k] ~ dnorm(0, 0.0001) + } + + # pairwise ORs + for(c in 1:(NT - 1)){ + for(k in (c + 1):NT){ + lor[c,k] <- d[k] - d[c] + } + } +}" +return(out) +} \ No newline at end of file diff -Nru altmeta-3.2/R/nma.fe.ic.R altmeta-3.3/R/nma.fe.ic.R --- altmeta-3.2/R/nma.fe.ic.R 1970-01-01 00:00:00.000000000 +0000 +++ altmeta-3.3/R/nma.fe.ic.R 2020-09-14 04:30:17.000000000 +0000 @@ -0,0 +1,30 @@ +## JAGS model for FE NMA with evidence inconsistency +nma.fe.ic <- function(o){ +out <- " +model{ + for(i in 1:NS){ + md[i,1] <- 0 + mu[i] ~ dnorm(0, 0.0001) # vague priors for trial baselines + for(k in 1:na[i]){ + r[i,k] ~ dbin(p[i,k], n[i,k]) # binomial likelihood + logit(p[i,k]) <- mu[i] + md[i,k] # model + rhat[i,k] <- p[i,k]*n[i,k] # expected counts + dev[i,k] <- 2*(r[i,k]*(log(r[i,k]) - log(rhat[i,k])) + + (n[i,k] - r[i,k])*(log(n[i,k] - r[i,k]) - log(n[i,k] - rhat[i,k]))) + # deviance contribution + } + resdev[i] <- sum(dev[i,1:na[i]]) # residual deviance for this trial + for(k in 2:na[i]){ + md[i,k] <- lor[t[i,1],t[i,k]] # LOR + } + } + totresdev <- sum(resdev[]) # total residual deviance + + for(c in 1:(NT - 1)){ + for(k in (c + 1):NT){ + lor[c,k] ~ dnorm(0, 0.0001) + } + } +}" +return(out) +} \ No newline at end of file diff -Nru altmeta-3.2/R/nma.icdf.R altmeta-3.3/R/nma.icdf.R --- altmeta-3.2/R/nma.icdf.R 1970-01-01 00:00:00.000000000 +0000 +++ altmeta-3.3/R/nma.icdf.R 2020-09-14 19:46:22.000000000 +0000 @@ -0,0 +1,238 @@ +## Calculating ICDF: la, Lu--Ades; fe, fixed-effects; re, random-effects +nma.icdf <- function(sid, tid, r, n, data, type = c("la", "fe", "re"), + n.adapt = 1000, n.chains = 3, n.burnin = 5000, n.iter = 20000, n.thin = 2, + traceplot = FALSE, nma.name = NULL, seed = 1234){ + if(missing(sid)) stop("please specify study ID.") + if(missing(tid)) stop("please specify treatment ID.") + if(missing(r)) stop("please specify event count.") + if(missing(n)) stop("please specify sample size.") + if(!missing(data)){ + sid <- eval(substitute(sid), data, parent.frame()) + tid <- eval(substitute(tid), data, parent.frame()) + r <- eval(substitute(r), data, parent.frame()) + n <- eval(substitute(n), data, parent.frame()) + } + if(all(!is.element(type, c("la", "fe", "re")))) stop("the type of ICDF is wrongly specified.") + if(any(!is.element(type, c("la", "fe", "re")))){ + type <- type[is.element(type, c("la", "fe", "re"))] + } + + n.trt <- length(unique(data$tid)) + study.idx <- unique(data$sid) + n.study <- length(study.idx) + out <- NULL + out$nstudy.trtarm <- table(table(data$sid)) + out$nstudy.multi <- sum(table(data$sid) > 2) + multi.trtarm <- NULL + multi.idx <- which(table(data$sid) > 2) + if(out$nstudy.multi > 0){ + for(i in 1:out$nstudy.multi){ + multi.trtarm[[i]] <- sort(data$tid[data$sid == multi.idx[i]]) + } + } + if(is.null(multi.trtarm)){ + multi.trtarm <- NA + } + out$multi.trtarm <- multi.trtarm + + if(is.element("la", type)){ + if(out$nstudy.multi > 0){ + out$icdf.la <- NA + }else{ + T <- 0 + for(h in 1:(n.trt - 1)){ + for(k in (h + 1):n.trt){ + T.temp <- 0 + for(i in 1:n.study){ + dat.temp <- data[data$sid == i,] + if(dim(dat.temp)[1] == 2){ + trt1.temp <- min(dat.temp$tid) + trt2.temp <- max(dat.temp$tid) + if(trt1.temp == h & trt2.temp == k){ + T.temp <- 1 + } + } + } + if(T.temp == 1) T <- T + 1 + } + } + out$icdf.la <- T - n.trt + 1 + } + } + + out <- c(out, list(icdf.fe = NA, icdf.re = NA)) + + if(is.element("fe", type) | is.element("re", type)){ + na <- as.numeric(table(data$sid)) + t <- r <- n <- matrix(NA, n.study, max(na)) + for(i in 1:n.study){ + dat.temp <- data[data$sid == study.idx[i],] + ord <- order(dat.temp$tid) + dat.temp <- dat.temp[ord,] + t[i, 1:na[i]] <- dat.temp$tid + r[i, 1:na[i]] <- dat.temp$r + n[i, 1:na[i]] <- dat.temp$n + } + dat.jags <- list(NT = n.trt, NS = n.study, r = r, n = n, t = t, na = na) + } + + if(is.element("fe", type)){ + inits.fe <- list( + list(mu = rep(0, n.study), + .RNG.name = "base::Wichmann-Hill", .RNG.seed = 1234), + list(mu = rep(1, n.study), + .RNG.name = "base::Wichmann-Hill", .RNG.seed = 12345), + list(mu = rep(-1, n.study), + .RNG.name = "base::Wichmann-Hill", .RNG.seed = 123456) + ) + params.fe <- c("lor", "totresdev") + + # FE NMA with evidence consistency + set.seed(seed) + jags.nma.fe.c <- jags.model(file = textConnection(nma.fe.c()), + data = dat.jags, inits = inits.fe, n.chains = n.chains, n.adapt = n.adapt) + update(jags.nma.fe.c, n.iter = n.burnin) + coda.nma.fe.c <- coda.samples(model = jags.nma.fe.c, + variable.names = params.fe, n.iter = n.iter, thin = n.thin) + smry.nma.fe.c <- summary(coda.nma.fe.c) + out.nma.fe.c <- smry.nma.fe.c$quantiles[grep("lor", + rownames(smry.nma.fe.c$quantiles)), c("2.5%", "50%", "97.5%")] + pD.nma.fe.c <- dic.samples(jags.nma.fe.c, n.iter = n.iter, thin = n.thin) + + # FE NMA with evidence inconsistency + set.seed(seed) + jags.nma.fe.ic <- jags.model(file = textConnection(nma.fe.ic()), + data = dat.jags, inits = inits.fe, n.chains = n.chains, n.adapt = n.adapt) + update(jags.nma.fe.ic, n.iter = n.burnin) + coda.nma.fe.ic <- coda.samples(model = jags.nma.fe.ic, + variable.names = params.fe, n.iter = n.iter, thin = n.thin) + smry.nma.fe.ic <- summary(coda.nma.fe.ic) + out.nma.fe.ic <- smry.nma.fe.ic$quantiles[grep("lor", + rownames(smry.nma.fe.ic$quantiles)), c("2.5%", "50%", "97.5%")] + pD.nma.fe.ic <- dic.samples(jags.nma.fe.ic, n.iter = n.iter, thin = n.thin) + + icdf.fe <- sum(pD.nma.fe.ic$penalty) - sum(pD.nma.fe.c$penalty) + out$icdf.fe <- icdf.fe + + if(traceplot){ + # trace plots for FE NMA with evidence consistency + for(i in 1:(n.trt - 1)){ + for(j in (i + 1):n.trt){ + filename <- paste0("traceplot_NMA_FE_C_", + "lor[", i , ",", j, "]", ".png") + if(!is.null(nma.name)){ + filename <- paste0(nma.name, "_", filename) + } + png(filename, res = 600, height = 8.5, width = 11, units = "in") + par(mfrow = c(length(coda.nma.fe.c), 1)) + for(k in 1:length(coda.nma.fe.c)){ + temp <- as.vector(coda.nma.fe.c[[k]][,paste0("lor[", i, ",", j, "]")]) + plot(temp, type = "l", col = "red", xlab = "Iteration", + ylab = paste0("lor[", i, ",", j, "]"), main = paste("Chain", k)) + } + dev.off() + } + } + + # trace plots for FE NMA with evidence inconsistency + for(i in 1:(n.trt - 1)){ + for(j in (i + 1):n.trt){ + filename <- paste0("traceplot_NMA_FE_IC_", + "lor[", i , ",", j, "]", ".png") + if(!is.null(nma.name)){ + filename <- paste0(nma.name, "_", filename) + } + png(filename, res = 600, height = 8.5, width = 11, units = "in") + par(mfrow = c(length(coda.nma.fe.ic), 1)) + for(k in 1:length(coda.nma.fe.ic)){ + temp <- as.vector(coda.nma.fe.ic[[k]][,paste0("lor[", i, ",", j, "]")]) + plot(temp, type = "l", col = "red", xlab = "Iteration", + ylab = paste0("lor[", i, ",", j, "]"), main = paste("Chain", k)) + } + dev.off() + } + } + } + } + + if(is.element("fe", type)){ + inits.re <- list( + list(mu = rep(0, n.study), tau = 0.1, + .RNG.name = "base::Wichmann-Hill", .RNG.seed = 1234), + list(mu = rep(1, n.study), tau = 0.5, + .RNG.name = "base::Wichmann-Hill", .RNG.seed = 12345), + list(mu = rep(-1, n.study), tau = 0.8, + .RNG.name = "base::Wichmann-Hill", .RNG.seed = 123456) + ) + params.re <- c("lor", "tau", "totresdev") + + # RE NMA with evidence consistency + set.seed(seed) + jags.nma.re.c <- jags.model(file = textConnection(nma.re.c()), + data = dat.jags, inits = inits.re, n.chains = n.chains, n.adapt = n.adapt) + update(jags.nma.re.c, n.iter = n.burnin) + coda.nma.re.c <- coda.samples(model = jags.nma.re.c, + variable.names = params.re, n.iter = n.iter, thin = n.thin) + smry.nma.re.c <- summary(coda.nma.re.c) + out.nma.re.c <- smry.nma.re.c$quantiles[grep("lor", + rownames(smry.nma.re.c$quantiles)), c("2.5%", "50%", "97.5%")] + pD.nma.re.c <- dic.samples(jags.nma.re.c, n.iter = n.iter, thin = n.thin) + + # RE NMA with evidence inconsistency + set.seed(seed) + jags.nma.re.ic <- jags.model(file = textConnection(nma.re.ic()), + data = dat.jags, inits = inits.re, n.chains = n.chains, n.adapt = n.adapt) + update(jags.nma.re.ic, n.iter = n.burnin) + coda.nma.re.ic <- coda.samples(model = jags.nma.re.ic, + variable.names = params.re, n.iter = n.iter, thin = n.thin) + smry.nma.re.ic <- summary(coda.nma.re.ic) + out.nma.re.ic <- smry.nma.re.ic$quantiles[grep("lor", + rownames(smry.nma.re.ic$quantiles)), c("2.5%", "50%", "97.5%")] + pD.nma.re.ic <- dic.samples(jags.nma.re.ic, n.iter = n.iter, thin = n.thin) + + icdf.re <- sum(pD.nma.re.ic$penalty) - sum(pD.nma.re.c$penalty) + out$icdf.re <- icdf.re + + if(traceplot){ + # trace plots for RE NMA with evidence consistency + for(i in 1:(n.trt - 1)){ + for(j in (i + 1):n.trt){ + filename <- paste0("traceplot_NMA_RE_C_", + "lor[", i , ",", j, "]", ".png") + if(!is.null(nma.name)){ + filename <- paste0(nma.name, "_", filename) + } + png(filename, res = 600, height = 8.5, width = 11, units = "in") + par(mfrow = c(length(coda.nma.re.c), 1)) + for(k in 1:length(coda.nma.re.c)){ + temp <- as.vector(coda.nma.re.c[[k]][,paste0("lor[", i, ",", j, "]")]) + plot(temp, type = "l", col = "red", xlab = "Iteration", + ylab = paste0("lor[", i, ",", j, "]"), main = paste("Chain", k)) + } + dev.off() + } + } + + # trace plots for RE NMA with evidence inconsistency + for(i in 1:(n.trt - 1)){ + for(j in (i + 1):n.trt){ + filename <- paste0("traceplot_NMA_RE_IC_", + "lor[", i , ",", j, "]", ".png") + if(!is.null(nma.name)){ + filename <- paste0(nma.name, "_", filename) + } + png(filename, res = 600, height = 8.5, width = 11, units = "in") + par(mfrow = c(length(coda.nma.re.ic), 1)) + for(k in 1:length(coda.nma.re.ic)){ + temp <- as.vector(coda.nma.re.ic[[k]][,paste0("lor[", i, ",", j, "]")]) + plot(temp, type = "l", col = "red", xlab = "Iteration", + ylab = paste0("lor[", i, ",", j, "]"), main = paste("Chain", k)) + } + dev.off() + } + } + } + } + + return(out) +} diff -Nru altmeta-3.2/R/nma.re.c.R altmeta-3.3/R/nma.re.c.R --- altmeta-3.2/R/nma.re.c.R 1970-01-01 00:00:00.000000000 +0000 +++ altmeta-3.3/R/nma.re.c.R 2020-09-14 04:29:44.000000000 +0000 @@ -0,0 +1,44 @@ +## JAGS model for RE NMA with evidence consistency +nma.re.c <- function(o){ +out <- " +model{ + for(i in 1:NS){ + w[i,1] <- 0 + delta[i,t[i,1]] <- 0 + mu[i] ~ dnorm(0, 0.0001) # vague priors for trial baselines + for(k in 1:na[i]){ + r[i,k] ~ dbin(p[i,t[i,k]], n[i,k]) # binomial likelihood + logit(p[i,t[i,k]]) <- mu[i] + delta[i,t[i,k]] # model + rhat[i,k] <- p[i,t[i,k]]*n[i,k] # expected counts + dev[i,k] <- 2*(r[i,k]*(log(r[i,k]) - log(rhat[i,k])) + + (n[i,k] - r[i,k])*(log(n[i,k] - r[i,k]) - log(n[i,k] - rhat[i,k]))) + # deviance contribution + } + resdev[i] <- sum(dev[i,1:na[i]]) # residual deviance for this trial + for(k in 2:na[i]){ + delta[i,t[i,k]] ~ dnorm(md[i,t[i,k]], taud[i,t[i,k]]) # LOR + md[i,t[i,k]] <- d[t[i,k]] - d[t[i,1]] + sw[i,k] # mean of LOR + taud[i,t[i,k]] <- prec*2*(k - 1)/k # precision of LOR + w[i,k] <- delta[i,t[i,k]] - d[t[i,k]] + d[t[i,1]] # multi-arm RCTs + sw[i,k] <- sum(w[i,1:(k-1)])/(k - 1) + } + } + totresdev <- sum(resdev[]) # total residual deviance + + d[1] <- 0 + for(k in 2:NT){ + d[k] ~ dnorm(0, 0.0001) + } + + prec <- 1/tau^2 + tau ~ dunif(0, 5) # prior for heterogeneity standard deviation + + # pairwise ORs + for(c in 1:(NT - 1)){ + for(k in (c + 1):NT){ + lor[c,k] <- d[k] - d[c] + } + } +}" +return(out) +} \ No newline at end of file diff -Nru altmeta-3.2/R/nma.re.ic.R altmeta-3.3/R/nma.re.ic.R --- altmeta-3.2/R/nma.re.ic.R 1970-01-01 00:00:00.000000000 +0000 +++ altmeta-3.3/R/nma.re.ic.R 2020-09-14 04:30:33.000000000 +0000 @@ -0,0 +1,33 @@ +## JAGS model for RE NMA with evidence inconsistency +nma.re.ic <- function(o){ +out <- " +model{ + for(i in 1:NS){ + delta[i,1] <- 0 + mu[i] ~ dnorm(0, 0.0001) # vague priors for trial baselines + for(k in 1:na[i]){ + r[i,k] ~ dbin(p[i,k], n[i,k]) # binomial likelihood + logit(p[i,k]) <- mu[i] + delta[i,k] # model + rhat[i,k] <- p[i,k]*n[i,k] # expected counts + dev[i,k] <- 2*(r[i,k]*(log(r[i,k]) - log(rhat[i,k])) + + (n[i,k] - r[i,k])*(log(n[i,k] - r[i,k]) - log(n[i,k] - rhat[i,k]))) + # deviance contribution + } + resdev[i] <- sum(dev[i,1:na[i]]) # residual deviance for this trial + for(k in 2:na[i]){ + delta[i,k] ~ dnorm(lor[t[i,1],t[i,k]], prec) # LOR + } + } + totresdev <- sum(resdev[]) # total residual deviance + + for(c in 1:(NT - 1)){ + for(k in (c + 1):NT){ + lor[c,k] ~ dnorm(0, 0.0001) + } + } + + prec <- 1/tau^2 + tau ~ dunif(0, 5) # prior for heterogeneity standard deviation +}" +return(out) +} \ No newline at end of file