您好,欢迎来到爱go旅游网。
搜索
您的当前位置:首页gemtc说明书

gemtc说明书

来源:爱go旅游网
Package‘gemtc’

September6,2016

Version0.8.1Date2016-09-06

TitleNetworkMeta-AnalysisUsingBayesianMethodsAuthorGertvanValkenhoef,JoelKuiper

MaintainerGertvanValkenhoef

DescriptionNetworkmeta-analyses(mixedtreatmentcomparisons)intheBayesian

frameworkusingJAGS.Includesmethodstoassessheterogeneityandinconsistency,andanumberofstandardvisualizations.Dependscoda(>=0.13)

Importsigraph(>=1.0),meta(>=2.1),plyr(>=1.8),graphics,

grDevices,stats,utils,grid,rjags(>=4-0),truncnorm,RglpkSuggeststestthat(>=0.8),Matrix,XML(>=3.6)URLhttp://github.com/gertvv/gemtcLicenseGPL-3LazyDatatrue

Collate'anohe.R''arrayize.R''blobbogram.R''template.R''code.R'

'data.R''deviance.R''forest.R''solveLP.R''inits.R''likelihoods.R''ll-helper.counts.R''ll.binom.cloglog.R''ll.binom.log.R''ll.binom.logit.R''ll.call.R''ll.normal.identity.R''ll.poisson.log.R'

'minimum.diameter.spanning.tree.R''mtc.data.studyrow.R''mtc.hy.prior.R''mtc.model.R''mtc.model.consistency.R''mtc.model.nodesplit.R''mtc.model.regression.R''mtc.model.ume.R''mtc.model.use.R''mtc.network.R''mtc.network.xml.R''stopIfNotConsistent.R''mtc.result.R''mtc.run.R''nodesplit.R''plotCovariateEffect.R''priors.R''rank.probability.R''regression.R''relative.effect.R''relative.effect.table.R'RoxygenNote5.0.1NeedsCompilationyesRepositoryCRAN

Date/Publication2016-09-0615:34:06

1

2gemtc-package

Rtopicsdocumented:

gemtc-package..atrialFibrillation..blobbogram....blocker......certolizumab...depression.....dietfat.......hfPrevention....ll.call.......mtc.anohe.....mtc.data.studyrow.mtc.deviance...mtc.hy.prior....mtc.model.....mtc.network....mtc.nodesplit...mtc.run......parkinson.....plotCovariateEffectrank.probability..read.mtc.network.relative.effect...relative.effect.tablesmoking......thrombolytic....

Index

.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................24581010111214151618222426282930313234353637

gemtc-packageGeMTC:Networkmeta-analysisinR

Description

AnRpackageforperformingnetworkmeta-analyses(mixedtreatmentcomparisons).Details

Networkmeta-analysis,ormixedtreatmentcomparison(MTC)isatechniquetometa-analyzenet-worksoftrialscomparingtwoormoretreatmentsatthesametime[Diasetal.2013a].UsingaBayesianhierarchicalmodel,alldirectandindirectcomparisonsaretakenintoaccounttoarriveatasingleconsistentestimateoftheeffectofallincludedtreatmentsbasedonallincludedstudies.Thispackageallowstheautomatedgenerationofnetworkmeta-analysismodels[vanValkenhoefetal.2012],inclusingbothfixedeffectandrandomeffectsnetworkmeta-analysis,node-splittingmodelstoidentifyinconsistency,andnetworkmeta-regressionmodels.ModelsareestimatedusingJAGS(throughtherjagspackage).

gemtc-package3

ThepackagecanreadGeMTCfilesthatwerecreatedbytheGeMTCGUI(nowobsolete)orex-portedfromADDIS1.x,iftheoptionalpackageXMLisinstalled.ThesourceforGeMTCisavailableundertheGPL-3onGithub.Author(s)

GertvanValkenhoefReferences

S.Dias,N.J.Welton,D.M.Caldwell,andA.E.Ades(2010),Checkingconsistencyinmixedtreat-mentcomparisonmeta-analysis,StatisticsinMedicine29(7-8,Sp.Iss.SI):932-944.[doi:10.1002/sim.3767]

S.Dias,A.J.Sutton,A.E.Ades,andN.J.Welton(2013a),AGeneralizedLinearModelingFrame-workforPairwiseandNetworkMeta-analysisofRandomizedControlledTrials,MedicalDecisionMaking33(5):607-617.[doi:10.1177/02729X12458724]

S.Dias,A.J.Sutton,N.J.Welton,andA.E.Ades(2013b),Heterogeneity-Subgroups,Meta-Regression,Bias,andBias-Adjustment,MedicalDecisionMaking33(5):618-0.[doi:10.1177/02729X13485157]

S.Dias,N.J.Welton,A.J.Sutton,D.M.Caldwell,G.Lu,andA.E.Ades(2013c),InconsistencyinNetworksofEvidenceBasedonRandomizedControlledTrials,MedicalDecisionMaking33(5):1-656.[doi:10.1177/02729X12455847]

A.Gelman,A.Jakulin,M.GraziaPittau,Y.-S.Su(2008),Aweaklyinformativedefaultpriordistri-butionforlogisticandotherregressionmodels,TheAnnalsofAppliedStatistics2(4):1360-1383.[doi:10.1214/08-AOAS191]

R.M.Turner,J.Davey,M.J.Clarke,S.G.Thompson,J.P.T.Higgins(2012),Predictingtheextentofheterogeneityinmeta-analysis,usingempiricaldatafromtheCochraneDatabaseofSystematicReviews,InternationalJournalofEpidemiology41(3):818-827.[doi:10.1093/ije/dys041]G.vanValkenhoef,G.Lu,B.deBrock,H.Hillege,A.E.Ades,andN.J.Welton(2012),Automatingnetworkmeta-analysis,ResearchSynthesisMethods3(4):285-299.[doi:10.1002/jrsm.10]G.vanValkenhoef,S.Dias,A.E.Ades,andN.J.Welton(2015),Automatedgenerationofnode-splittingmodelsforassessmentofinconsistencyinnetworkmeta-analysis,ResearchSynthesisMethods,acceptedmanuscript.[doi:10.1002/jrsm.1167]

G.vanValkenhoefetal.(draft),Modelinginconsistencyasheterogeneityinnetworkmeta-analysis,draftmanuscript.

D.E.Warn,S.G.Thompson,andD.J.Spiegelhalter(2002),Bayesianrandomeffectsmeta-analysisoftrialswithbinaryoutcomes:methodsfortheabsoluteriskdifferenceandrelativeriskscales,StatisticsinMedicine21(11):1601-1623.[doi:10.1002/sim.11]SeeAlso

mtc.network,mtc.model,mtc.run

4Examples

#Loadtheexamplenetworkandgenerateaconsistencymodel:model<-mtc.model(smoking,type=\"consistency\")

atrialFibrillation

#Loadpre-generatedsamplesinsteadofruningthemodel:##Notrun:results<-mtc.run(model,thin=10)

results<-dget(system.file(\"extdata/luades-smoking.samples.gz\package=\"gemtc\"))#Printabasicstatisticalsummaryoftheresults:summary(results)

##Iterations=5010:25000##Thinninginterval=10##Numberofchains=4

##Samplesizeperchain=2000##

##1.Empiricalmeanandstandarddeviationforeachvariable,##plusstandarderrorofthemean:####MeanSDNaiveSETime-seriesSE##d.A.B0.49650.40810.0045630.0049##d.A.C0.83590.24330.0027200.003147##d.A.D1.10880.43550.0048690.005280##sd.d0.84650.19130.0021390.002965##

##2.Quantilesforeachvariable:####2.5%25%50%75%97.5%##d.A.B-0.29850.23120.49100.75301.341##d.A.C0.38780.67200.82730.98671.353##d.A.D0.26920.81971.09831.38242.006##sd.d0.55090.71190.81800.921.283

atrialFibrillationPreventionofstrokeinatrialfibrillationpatients

Description

Adatasetof25trialsinvestigating17treatmentsforstrokepreventioninatrialfibrillationpatients.Themainoutcomeisthenumberofpatientswithastroke,andacovariatecapturestheproportionofpatientswithapriorstroke.

DataaretakefromTable1ofCooperetal.(2009),withthefollowingcorrectionsapplied:SPAF3andAFASAK2donothaveatreatment13arm,andSPAF1doesnotcontaintreatment5,buttreatment6.Thankstoprof.Cooperforprovidingtheoriginalanalysisdataset.Format

Anetworkmeta-regressiondatasetcontaining60rowsofarm-baseddata(respondersandsamplesize).

blobbogramSource

5

Cooperetal.(2009),Adressingbetween-studyheterogeneityandinconsistencyinmixedtreatmentcomparisons:Applicationtostrokepreventiontreatmentsinindividualswithnon-rheumaticatrialfibrillation,StatisticsinMedicine28:1861-1881.[doi:10.1002/sim.3594]Examples

#BuildamodelsimilartoModel4(b)fromCooperetal.(2009):classes<-list(\"control\"=c(\"01\"),

\"anti-coagulant\"=c(\"02\

\"anti-platelet\"=c(\"05\\"mixed\"=c(\"13\regressor<-list(coefficient=󰁑shared󰁑,

variable=󰁑stroke󰁑,classes=classes)model<-mtc.model(atrialFibrillation,

type=\"regression\regressor=regressor,om.scale=10)##Notrun:

result<-mtc.run(model)##End(Notrun)

blobbogramPlotablobbogram(AKAforestplot)

Description

blobbogramisaflexiblefunctionforcreatingblobbograms(forestplots),makingnospecificas-sumptionsaboutthedatabeingplotted.Itsupportscolumnandrowgroupingaswellaspagination.Usage

blobbogram(data,id.label=\"Study\ci.label=\"Mean(95%CI)\

left.label=NULL,right.label=NULL,center.label=NULL,log.scale=FALSE,xlim=NULL,styles=NULL,grouped=TRUE,group.labels=NULL,columns=NULL,column.labels=NULL,

column.groups=NULL,column.group.labels=NULL,digits=2,

ask=dev.interactive(orNone=TRUE),draw.no.effect=TRUE)forest(x,...)

6

Arguments

dataid.labelci.labelleft.labelright.labelcenter.labellog.scalexlim

blobbogram

Adataframecontainingonerowforeachconfidenceintervaltobevisualized.Thedataformatisdescribedbelow.Labeltoshowabovetherow-idcolumn.Labeltoshowabovetheconfidenceintervals.

Labeltoshowontheleft-handsideoftheno-differenceline.Labeltoshowontheright-handsideoftheno-differenceline.Labeltoshowcenter-alignedwiththeno-differenceline.

IfTRUE,theconfidenceintervalsaregivenonalogscale,andaxislabelswillbeexp()transformed.

Thescalelimitsoftheplot,iftheconfidenceintervalexceedstheselimitsanarrowwillbeshownatthelimit.Ifunspecified,limitswillbechosenthaten-compassallconfidenceintervals.

Adataframedescribingthedifferentrowstyles.Bydefault,thestyles\"normal\\"pooled\"and\"group\"aredefined.

IfTRUE,andgroup.labelsarespecified,rowswillbegroupedaccordingtothe\"group\"columngiveninthedataargument.Vectorofgrouplabels.

Additionaluser-definedcolumnstobeshown(namesofcolumnsgiveninthedataargument).

Avectoroflabelsfortheuser-definedcolumns.

stylesgroupedgroup.labelscolumnscolumn.labels

column.groupsColumngroups,anumericvectorspecifyingthecolumngroupforeachcolumn.column.group.labels

Avectoroflabelsforthecolumngroups.digitsask

Thenumberof(significant)digitstoprint.

IfTRUE,apromptwillbedisplayedbeforegeneratingthenextpageofamulti-pageplot.

Anobjecttocreateaforestplotof.Additionalarguments.

draw.no.effectIfTRUE,drawtheno-effectline.x...Details

TheforestfunctionisagenericS3method(definitioncompatiblewiththemetapackage).Thispackagedefinesmethodsformtc.resultandmtc.relative.effect.table.

Theblobbogramfunctioncreatesablobbogram(forestplot)fromthegivendata(pointestimatesandconfidenceintervals)andmeta-data(labels,columnspecifications,columngroups,rowgroups,styles)usingthegridpackage.Iftheplotwouldnotfitthedevice’sgraphicsregion,thecontentisbrokenupintomultipleplotsgeneratedinsequence(pagination).

Thedataargumentisgivenasadataframecontainingthefollowingcolumns:•id:identifier(label)forthisrow.

blobbogram

•group(optional):rowgroupthisrowbelongsto(indexesintothegroup.labelsargument).•pe:pointestimate.

•ci.l:lowerconfidenceintervallimit.•ci.u:upperconfidenceintervallimit.

•style:thestyletoapplytothisrow(definedinthestylesargument).

7

Additionaluser-definedcolumnscanbespecifiedusingthecolumnsandcolumn.labelsargu-ments.

Thestylesargumentisgivenasadataframecontainingthefollowingcolumns:•style:nameofthestyle.•weight:fontweight.

•pe.style:symboltodrawforthepointestimate(\"circle\"or\"square\currently).

Value

None.Note

Thismethodshouldnotbeconsideredstable.Weintendtogeneralizeitfurtherandpossiblyprovideitinaseparatepackage.Theinterfacemaychangeatanytime.Author(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

meta::forest,grid::GridExamples

data<-read.table(textConnection(󰁑idgrouppeci.lci.ustylevalue.Avalue.B\"Study1\"10.350.080.92\"normal\"\"2/46\"\"7/46\"\"Study2\"10.430.151.14\"normal\"\"4/50\"\"8/49\"\"Study3\"20.310.070.74\"normal\"\"2/97\"\"10/100\"\"Study4\"20.860.342.90\"normal\"\"9/104\"\"6/105\"\"Study5\"20.330.100.72\"normal\"\"4/74\"\"14/74\"\"Study6\"20.470.230.91\"normal\"\"11/120\"\"22/129\"\"Pooled\"NA0.420.151.04\"pooled\"NANA󰁑),header=TRUE)

data$pe<-log(data$pe)

data$ci.l<-log(data$ci.l)data$ci.u<-log(data$ci.u)

blobbogram(data,group.labels=c(󰁑GROUP1󰁑,󰁑GROUP2󰁑),

columns=c(󰁑value.A󰁑,󰁑value.B󰁑),column.labels=c(󰁑r/n󰁑,󰁑r/n󰁑),

8

column.groups=c(1,2),grouped=TRUE,

column.group.labels=c(󰁑Intervention󰁑,󰁑Control󰁑),

id.label=\"Trial\ci.label=\"OddsRatio(95%CrI)\log.scale=TRUE)

certolizumab

blockerBetablockerstopreventmortalityaftermyocardialinfarction

Description

Adatasetof22trialsinvestigatingbetablockersversuscontroltopreventmortalityaftermyocardialinfarction.Numberofeventsandsamplesize.Format

Ameta-analysisdatasetcontaining44rowsofarm-baseddata(respondersandsamplesize).Source

S.Dias,A.J.Sutton,A.E.Ades,andN.J.Welton(2013a),AGeneralizedLinearModelingFrame-workforPairwiseandNetworkMeta-analysisofRandomizedControlledTrials,MedicalDecisionMaking33(5):607-617.[doi:10.1177/02729X12458724]

J.B.Carlin(1992),Meta-analysisfor2×2tables:aBayesianapproach,StatisticsinMedicine11(2):141-158.[doi:10.1002/sim.4780110202]

certolizumabCertolizumabPegol(CZP)forRheumatoidArthritis

Description

Adatasetof12trialsinvestigating6treatmentsandplaceboforrheumatoidarthritis.Themainoutcomeisthenumberofpatientswhoimprovedbyatleast50%ontheAmericanCollegeofRheumatologyscale(ACR50)at6Months.Acovariateispresentforthemeandiseasedurationatbaseline(years).Format

Anetworkmeta-regressiondatasetcontaining24rowsofarm-baseddata(respondersandsamplesize).Source

S.Dias,A.J.Sutton,N.J.Welton,andA.E.Ades(2013b),Heterogeneity-Subgroups,Meta-Regression,Bias,andBias-Adjustment,MedicalDecisionMaking33(5):618-0.[doi:10.1177/02729X13485157]

depressionExamples

#RunREregressionmodelwithinformativeheterogeneitypriorregressor<-list(coefficient=󰁑shared󰁑,

variable=󰁑diseaseDuration󰁑,control=󰁑Placebo󰁑)

#sd~half-Normal(mean=0,sd=0.32)

hy.prior<-mtc.hy.prior(type=\"std.dev\distr=\"dhnorm\0,9.77)model<-mtc.model(certolizumab,

type=\"regression\regressor=regressor,hy.prior=hy.prior)##Notrun:

result<-mtc.run(model)##End(Notrun)

9

depressionTreatmentresponseinmajordepression

Description

Adatasetof111trialsinvestigating12treatmentsformajordepressionontreatmentresponse.Treatmentresponsewasdefinedasareductionofatleast50%fromthebaselinescoreontheHAM-DorMADRSatweek8(or,ifnotavailable,anothertimebetweenweek6and12).

Format

Anetworkmeta-analysisdatasetcontaining224rowsofarm-baseddata(respondersandsamplesize).

Source

Ciprianietal.(2009),Comparativeefficacyandacceptabilityof12new-generationantidepres-sants:amultiple-treatmentsmeta-analysis,Lancet373(9665):746-758.[doi:10.1016/S0140-6736(09)60046-5]

10hfPrevention

dietfatEffectsoflow-fatdietsonmortality

Description

Adatasetof10trialsinvestigatinglow-fatdietversuscontroldietformortality.Numberofeventsandexposureinperson-years.Format

Ameta-analysisdatasetcontaining20rowsofarm-baseddata(responders,exposure,andsamplesize).Source

S.Dias,A.J.Sutton,A.E.Ades,andN.J.Welton(2013a),AGeneralizedLinearModelingFrame-workforPairwiseandNetworkMeta-analysisofRandomizedControlledTrials,MedicalDecisionMaking33(5):607-617.[doi:10.1177/02729X12458724]

Hooperetal.(2000),Reducedormodifieddietaryfatforpreventingcardiovasculardisease,CochraneDatabaseofSystematicReviews2:CD002137.[doi:10.1002/14651858.CD002137]

hfPrevention

Statinsversusplaceboinprimaryandsecondarypreventionofheartfailure

Description

Adatasetof19trialscomparingstatinsversusplaceboorusualcareforcholesterollowering.Themainoutcomeisthenumberofdeaths.Trialsareeitherprimaryprevention(nopreviousheartdisease;secondary=0)orsecondaryprevention(previousheartdisease;secondary=1).Format

Ameta-regressiondatasetcontaining38rowsofarm-baseddata(respondersandsamplesize).Source

S.Dias,A.J.Sutton,N.J.Welton,andA.E.Ades(2013b),Heterogeneity-Subgroups,Meta-Regression,Bias,andBias-Adjustment,MedicalDecisionMaking33(5):618-0.[doi:10.1177/02729X13485157]

ll.callExamples

#BuildamodelsimilartoProgram1(a)fromDiasetal.(2013b):regressor<-list(coefficient=󰁑shared󰁑,

variable=󰁑secondary󰁑,control=󰁑control󰁑)model<-mtc.model(hfPrevention,

type=\"regression\regressor=regressor,

hy.prior=mtc.hy.prior(\"std.dev\\"dunif\0,5))##Notrun:

result<-mtc.run(model)##End(Notrun)

11

ll.callCallalikelihood/link-specificfunction

Description

GeMTCimplementsvariouslikelihood/linkcombinations.Functionalityspecifictothelikeli-hood/linkishandledbymethodswithnamesendingin...Thisconveniencefunctioncallssuchmethods.Usage

ll.call(fnName,model,...)Arguments

fnNamemodel...Details

Thefollowingmethodscurrentlyneedtobeimplementedtoimplementalikelihood/link:•mtc.arm.mle:calculatesa(corrected)maximumlikelihoodestimateforanarm-leveleffect.Usedtogeneratestartingvalues.

•mtc.rel.mle:calculatesa(corrected)maximumlikelihoodestimateforarelativeeffect.Usedtogeneratestartingvalues.

•mtc.code.likelihood:generatesJAGScodeimplementingthelikelihood.•scale.log:returnsTRUEifplotsshouldusethelogscale.•scale.name:returnstheuser-facingnameoftheoutcomemetric.

Thenameofthefunctiontocall.Seedetailsforavailablefunctions.

AnobjectofS3classmtc.modeldescribinganetworkmeta-analysismodel,oralistcontainingelementsnamed’likelihood’and’link’.Additionalargumentstobepassedtothefunction.

12mtc.anohe

•scale.limit.inits:returnsanupperandlowerboundfortheinitialvalues,becausesomeinitialvaluesmighttriggerboundaryconditionssuchasprobability0or1forthebinomial.•required.columns.ab:returnstherequiredcolumnsforarm-baseddata.

Thefirsttwomethodscannowalsobeusedtoselectivelyapplycontinuitycorrectionsincasethemaximumlikelihoodestimatesareusedforotherpurposes.mtc.arm.mlehasanadditionalk=0.5argumenttospecifythecorrectionfactor.mtc.rel.mlehasargumentscorrection.force=TRUEtoforceapplicationofthecontinuitycorrectionevenifunnecessary,correction.type=\"constant\"tospecifythetypeofcorrection(specify\"reciprocal\")foracorrectionproportionaltotherecip-rocalofthesizeoftheotherarm,andcorrection.magnitude=1tospecifythe(total)magnitudeofthecorrection.Thesecorrectionsapplyonlyforcountdata,andwillbeignoredforcontinuouslikelihood/links.

Value

Thereturnvalueofthecalledfunction.Author(s)

GertvanValkenhoefSeeAlso

mtc.modelExamples

#The\"model\"maybeastub.

model<-list(likelihood=\"poisson\link=\"log\")ll.call(\"scale.name\model)#\"HazardRatio\"

ll.call(\"mtc.arm.mle\model,c(󰁑responders󰁑=12,󰁑exposure󰁑=80))#meansd#-1.85629800.1118034

mtc.anoheAnalysisofheterogeneity(ANOHE)

Description

(EXPERIMENTAL)Generateananalysisofheterogeneityforthegivennetwork.Threetypesofmodelareestimated:unrelatedstudyeffects,unrelatedmeaneffects,andconsistency.Outputofthesummaryfunctioncanpassedtoplotforavisualrepresentation.Usage

mtc.anohe(network,...)

mtc.anoheArguments

network...

AnobjectofS3classmtc.network.

13

Argumentstobepassedtomtc.runormtc.model.Thiscanbeusedtosetthelikelihood/linkorthenumberofiterations,forexample.

Details

Analysisofheterogeneityisintendedtobeaunifiedsetofstatisticsandavisualdisplaythatallowsthesimultaneousassessmentofbothheterogeneityandinconsistencyinnetworkmeta-analysis[vanValkenhoefetal.2014b(draft)].

mtc.anohereturnstheMCMCresultsforallthreetypesofmodel.Togetappropriatesummarystatistics,callsummary()ontheresultsobject.Thesummarycanbeplotted.

TocontrolparametersoftheMCMCestimation,seemtc.run.Tospecifythelikelihood/linkortocontrolothermodelparameters,seemtc.model.The...argumentsarefirstmatchedagainstmtc.run,andthosethatdonotmatcharepassedtomtc.model.Value

Formtc.anohe:anobjectofclassmtc.anohe.Thisisalistwiththefollowingelements:result.useresult.umeresult.cons

TheresultfortheUSEmodel(seemtc.run).TheresultfortheUMEmodel(seemtc.run).Theresultfortheconsistencymodel(seemtc.run).

Forsummary:anobjectofclassmtc.anohe.summary.Thisisalistwiththefollowingelements:cons.modelstudyEffectspairEffectsconsEffectsindEffectsisquared.compisquared.globNote

Thismethodshouldnotbeconsideredstable.Itisanexperimentalfeatureandheavilyworkinprogress.Theinterfacemaychangeatanytime.Author(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

mtc.modelmtc.run

Generatedconsistencymodel.

Study-leveleffectsummaries(multi-armtrialsdownweighted).Pair-wisepooledeffectsummaries(fromtheUMEmodel).Consistencyeffectsummaries.

Indirecteffectsummaries(back-calculated).Per-comparisonI-squaredstatistics.GlobalI-squaredstatistics.

14mtc.data.studyrow

mtc.data.studyrowConvertone-study-per-rowdatasets

Description

Convertsdatasetsintheone-study-per-rowformattoone-arm-per-rowformatusedbyGeMTCUsage

mtc.data.studyrow(data,

armVars=c(󰁑treatment󰁑=󰁑t󰁑,󰁑responders󰁑=󰁑r󰁑,󰁑sampleSize󰁑=󰁑n󰁑),nArmsVar=󰁑na󰁑,studyVars=c(),

studyNames=1:nrow(data),treatmentNames=NA,

patterns=c(󰁑%s..󰁑,󰁑%s..%d.󰁑))Arguments

dataarmVars

Datainone-study-per-rowformat.

Vectorofper-armvariables.Thenameofeachcomponentwillbethecolumnnameintheresultingdataset.Thecolumnnameinthesourcedatasetisderivedfromthevalueofeachcomponent.

Variableholdingthenumberofarmsforeachstudy.

Vectorofper-studyvariables.Thenameofeachcomponentwillbethecolumnnameintheresultingdataset.Thecolumnnameinthesourcedatasetisderivedfromthevalueofeachcomponent.Vectorofstudynames.

Patternstogeneratecolumnnamesinthesourcedataset.Thefirstisforper-studyvariables,thesecondforper-armvariables.

nArmsVarstudyVars

studyNamespatterns

treatmentNamesVectoroftreatmentnames.

Details

Mapstheone-study-per-rowformatthatiswidelyusedandconvenientforBUGSmodelstotheone-arm-per-rowformatusedbyGeMTC.AstheprimarypurposeistoinputdatasetsfromBUGSmodels,thedefaultsworkforthestandardBUGSdatatableformat.Inmostcases,itshouldbepossibletojustcopy/pastetheBUGSdatatable(withoutthefinal’END’)andread.tableitintoR,thenapplymtc.data.studyrow.Inmanycases,theresultingtablecanbeprocesseddirectlybymtc.network.Value

Adatatablewiththerequestedcolumns.

mtc.devianceAuthor(s)

GertvanValkenhoefSeeAlso

mtc.networkExamples

##ExampletakenfromtheNICEDSUTSDseriesinEvidenceSynthesis,#2##DopamineagonistsforthetreatmentofParkinson󰁑s

#Readthebugs-formatteddata

data.src<-read.table(textConnection(󰁑

t[,1]t[,2]t[,3]y[,1]y[,2]y[,3]se[,1]se[,2]se[,3]na[]13NA-1.22-1.53NA0.5040.439NA212NA-0.7-2.4NA0.2820.258NA2

124-0.3-2.6-1.20.5050.5100.478334NA-0.24-0.59NA0.2650.3NA234NA-0.73-0.18NA0.3350.442NA245NA-2.2-2.5NA0.1970.190NA2

45NA-1.8-2.1NA0.2000.250NA2󰁑),header=TRUE)#Convertthedata,settingtreatmentnamesdata<-mtc.data.studyrow(data.src,

armVars=c(󰁑treatment󰁑=󰁑t󰁑,󰁑mean󰁑=󰁑y󰁑,󰁑std.err󰁑=󰁑se󰁑),treatmentNames=c(󰁑Placebo󰁑,󰁑DA1󰁑,󰁑DA2󰁑,󰁑DA3󰁑,󰁑DA4󰁑))#Checkthatthedataarecorrectprint(data)

#Createanetwork

network<-mtc.network(data)

15

mtc.devianceInspectresidualdeviance

Description

InspecttheposteriorresidualdevianceandsummarizeitusingplotsUsage

mtc.deviance(result)mtc.devplot(x,...)mtc.levplot(x,...)

##S3methodforclass󰁑mtc.deviance󰁑plot(x,auto.layout=TRUE,...)

16Arguments

resultx

auto.layout...Details

Anobjectofclassmtc.result.Anobjectofclassmtc.deviance.

mtc.hy.prior

IfTRUE,theseparateplotswillbeshownaspanelsonasinglepage.Graphicalparameters.

mtc.devplotwillgenerateastemplotoftheposteriordevianceperarm(ifthereareonlyarm-baseddata)orthemeanperdatapointdevianceperstudy(iftherearecontrast-baseddata).

mtc.levplotwillplottheleverageversusthesquarerootoftheresidualdeviance(meanperdatapointforeachstudy).

Thegenericplotfunctionwilldisplaybothonasinglepage(unlessauto.layout=FALSE).Value

mtc.deviancereturnsthedeviancestatisticsofamtc.result.Author(s)

GertvanValkenhoefSeeAlso

mtc.run

mtc.hy.priorSetpriorsfortheheterogeneityparameter

Description

Thesefunctionsgeneratepriorsfortheheterogeneityparameterinmtc.model.Priorscanbesetexplicitlyor,foroutcomesonthelogodds-ratioscale,basedonempiricalresearch.Usage

mtc.hy.prior(type,distr,...)

mtc.hy.empirical.lor(outcome.type,comparison.type)

mtc.hy.priorArguments

typedistr

17

Typeofheterogeneityprior:’std.dev’,’var’,or’prec’forstandarddeviation,variance,orprecisionrespectively.

Priordistributionname(JAGSsyntax).Typicaloneswouldbe’dunif’(uni-form),’dgamma’(Gamma),or’dlnorm’(log-normal).Use’dhnorm’forthehalf-normal.Notethat,asinJAGS,theprecision(andnotthevarianceorstan-darddeviation)isusedforthenormaldistributionanditsderivatives.

Argumentstothedistr.Canbenumericalvaluesor\"om.scale\"fortheesti-matedoutcomemeasurescale(seemtc.model)

Thetypeofoutcometogetanempiricalpriorfor.Canbeoneof’mortality’(all-causemortality),’semi-objective’(e.g.cause-specificmortality,majormor-bidityevent,drop-outs),or’subjective’(e.g.pain,mentalhealth,dichotomousbiomarkers).

Thetypeofcomparisontogetanempiricalpriorfor.Canbeoneof’pharma-control’(pharmacologicalinterventionsversuscontrol),’pharma-pharma’(phar-macologicalversuspharmacologicalinterventions)and’non-pharma’(anyothercomparisons).

...

outcome.type

comparison.type

Details

Thegeneratedpriorisalist,thestructureofwhichmaychangewithoutnotice.ItcanbeconvertedtoJAGScompatiblecodeusingas.character.

Empiricalpriorsforthelogodds-ratio(LOR)aretakenfrom[Turneretal.2012].Value

Avaluetobepassedtomtc.model.Author(s)

GertvanValkenhoefSeeAlso

mtc.modelExamples

#NOTE:themtc.runcommandsbelowareforillustrativepurposes,suchasmall#numberofiterationsshouldobviouslynotbeusedinpractice.

#setauniformpriorstandarddeviation

model1<-mtc.model(smoking,hy.prior=mtc.hy.prior(\"std.dev\\"dunif\0,2))result<-mtc.run(model1,n.adapt=10,n.iter=10)

#setanempirical(log-normal)prioronthevariance

model2<-mtc.model(smoking,hy.prior=mtc.hy.empirical.lor(\"subjective\\"non-pharma\"))

18

result<-mtc.run(model2,n.adapt=10,n.iter=10)

mtc.model

#setagammapriorontheprecision

model3<-mtc.model(smoking,hy.prior=mtc.hy.prior(\"prec\\"dgamma\0.01,0.01))result<-mtc.run(model3,n.adapt=10,n.iter=10)

mtc.modelGeneratenetworkmeta-analysismodels

Description

Themtc.modelfunctiongeneratesnetworkmeta-analysismodelsfromanmtc.networkobject.Usage

mtc.model(network,type=\"consistency\factor=2.5,n.chain=4,likelihood=NULL,link=NULL,linearModel=\"random\

om.scale=NULL,hy.prior=mtc.hy.prior(\"std.dev\\"dunif\0,\"om.scale\"),dic=TRUE,powerAdjust=NA,...)Arguments

networktypefactorn.chainlikelihoodlinklinearModelom.scale

AnobjectofS3classmtc.network

Astringliteralindicatingthetypeofmodel(allowedvaluesare\"consistency\\"regression\\"nodesplit\\"ume\or\"use\").VariancescalingfactorforthestartingvaluesNumberofchainsinthemodel

Thelikelihoodtobeused.Ifunspecified,asuitablelikelihoodwillbeinferredforthegivendata.

Thelinkfunctiontobeused.Ifunspecified,asuitablelinkfunctionwillbeinferredforthegivendata.

Thetypeoflinearmodeltobegenerated.Canbe\"random\"forarandomeffectsmodel,or\"fixed\"forafixedeffectmodel.

Outcomemeasurescale.Representsa\"verylarge\"differenceontheanalysis’outcomescale.Thisisusedtosetvaguepriors.Forthelogodds-ratio,valuesbetween2and5areconsideredreasonable.Forcontinuousoutcomes,thisde-pendsheavilyonthespecificoutcome.Ifleftunspecified,itisdeterminedfromthedata.

Heterogeneityprior.Seemtc.hy.prior.

WhensettoTRUE,devianceandfittedvalueswillbemonitoredtoallowcom-putationoftheDevianceInformationCriterion(DIC)atresidual.

Optional:thenameofacolumninthestudiesdataframeofthemtc.network.Thiscolumnmustcontainvaluesbetween0and1.Thelikelihoodforeachstudywillbeadjustedbyinflatingthevariance,where0meansthestudyisexcludedand1meansitreceivesfullweight.Seedetailsformore.

Additionalargumentstobepassedtothetype-specificmodelgenerationfunc-tion.

hy.priordic

powerAdjust

...

mtc.modelDetails

19

Themtc.modelfunctiongeneratesanobjectofS3classmtc.model,whichcanbevisualizedbythegenericplotfunctionorsummarizedbythegenericsummaryfunction.Theselikelihood/linksaresupported:

•normal/identity:forcontinuous(meandifference)data.

Requiredcolumns:[mean,std.err]or[mean,std.dev,sampleSize].Result:relativemeandifference.

•binom/logit:fordichotomousdata.

Requiredcolumns[responders,sampleSize].Result:(log)oddsratio.

•binom/log:fordichotomousdata.

Requiredcolumns[responders,sampleSize].Result:(log)riskratio.

•binom/cloglog:forrate(survival)data-equalfollow-upineacharm.Requiredcolumns[responders,sampleSize].Result:(log)hazardratio.

•poisson/log:forrate(survival)data.

Requiredcolumns[responders,exposure].Result:(log)hazardratio.

Mostlikelihood/linksfollow[Diasetal.2013a],andthebinom/logmodelfollows[Warnetal.2002].

Thefollowingmodeltypesaresupported:

•consistency:ordinaryconsistencymodel.Noadditionalparameters.[Diasetal.2013a,vanValkenhoefetal.2012]

•nodesplit:node-splittingmodel.Removesbotharmsusedtoestimatethedirectevidencefromthenetworkofindirectevidence,ratherthanjustoneofthosearms.Thismeansthatthree-armtrialsdonotcontributeanyevidenceinthenetworkofindirectevidence.Whenrelativeeffectdataarepresent,thesearetransformedappropriately(usinganassumptionofnormality)toenablethisdirect/indirectevidencesplit.Additionalparameters:t1andt2,whichindicatethecomparisontobesplit.[Diasetal.2010,vanValkenhoefetal.2015]•regression:meta-regressionmodel.Additionalparameters:regressor,whichindicateshowtostructurethetreatment-interactionmodelfortheregression.Seebelowfordetails.•use:unrelatedstudyeffects.Modelstheeffectswithineachstudyasifthestudiesareinde-pendent.Noadditionalparameters.[vanValkenhoefetal.(draft)]

•ume:unrelatedmeaneffects.Modelstheeffectswithineachcomparisonasiftheyareinde-pendent.Doesnotproperlyhandlemulti-armtrials,andwarnswhentheyarepresentinthenetwork.Noadditionalparameters.[Diasetal.2013b,vanValkenhoefetal.(draft)]Regressorspecification:alistwithelements:variable,coefficient,andeithercontrolorclasses.Thevariableisthenameofthecovariatetoincludeintheregressionanalysis,andmustbeacolumnofthestudiesdataframeinthenetwork.Theregressorvariableisautomati-callycenteredandstandardizedusingthemethodrecommendedbyGelmanetal.(2008).The

20mtc.model

coefficientindicatesthetypeoftreatment-interactionmodel:\"shared\\"unrelated\or\"ex-changeable\".control,ifspecified,mustbetheIDofatreatmentinthenetwork.Allothertreat-mentshaveacoefficientrelativetothecontrol,whichcanbethesameforalltreatments(\"shared\"),differentforalltreatments(\"unrelated\")orexchangeablebetweentreatments(\"exchangeable\").classesisanamedlistoftreatmentclasses,thefirstofwhichwillactasthecontrolclass.EachclassisavectoroftreatmentIDsfromthenetwork.Only\"shared\"coefficientscancurrentlybeused,meaningasinglecoefficientperclass(exceptthecontrolclass).SeealsoatrialFibrillation,certolizumab,andhfPreventionforexamplesofmeta-regressionanalyses.

StudiescanbedownweightedbyusingthepowerAdjustargument,whichappliesavarianceinfla-tion(alsoknownas\"powerprior\")tothelikelihood.Thisallowsaweightαi∈[0,1]tobespecifiedforeachstudyi.Thelog-likelihoodwillbemultipliedbyafactorαi,orequivalentlyfornormaldistributionsthevariancewillbemultipliedby1/αi.Settingαi=0willcompletelyexcludethatstudy,whereassettingαi=1willweightitfully.Essentially,down-weightedmodelsmodifythedataandhencemodelfitstatisticssuchasDICcannotbecomparedbetweenmodelswithdifferentweightings.

Value

Anobjectofclassmtc.model.Thefollowingelementsaredescriptive:typenetworktreevar.scalelikelihoodlinkom.scaleregressor

Thetypeofmodel

NetworkthemodelwasgeneratedfromSpanningtreeformedbythebasicparametersThescalingfactorusedtoover-dispersestartingvaluesThelikelihoodusedThelinkfunctionused

Thescaleforthevarianceparameters

Regressorspecification(regressionmodelsonly):includesadditionalelements\"center\"and\"scale\"describinghowtheregressorinputwasstandardized

TheseelementsdeterminethemodelrunbyJAGS:n.chaincodedatainitsmonitorsdic

Thenumberofchains

ModelcodeinJAGSsyntax.Usecat()forproperformatting.DatainJAGScompatibleformatInitialvaluesinJAGScompatibleformatThenodesoftheJAGSmodeltomonitorWhethertocomputetheDIC

Theselatterfieldscanbemodifiedtoalterthestatisticalmodel,butsuchchangesmaybreakthemodelorassumptionsmadeelsewhereinthepackage.

mtc.modelVisualization

21

CallingthegenericplotmethodonanS3mtc.modelobjectwillshowagraphwiththetreatmentsasverticesandthecomparisonsasedges.Thelineswithsolidarrowsrepresentbasicparameters,andtheotherlinesrepresentcomparisonsthatarenotassociatedwithanyparameterbutdohavedirectevidencefromtrials.

Theexamplecodewillgeneratethefollowinggraph:

BCADEThedefaultlayoutalgorithmisigraph::layout.circle,otherlayoutalgorithmscanbeusedby

passingthemasanoptionalargumentcalledlayouttoplot.Theigraph::layout.fruchterman.reingoldalgorithmalsoseemstoproduceniceresultsandmaybebetterforlargegraphs.Author(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

mtc.network,mtc.runExamples

#RandomeffectsconsistencymodelforParkinsonnetworkmodel<-mtc.model(parkinson)plot(model)summary(model)

#Fixedeffectmeta-regressionforheartfailurepreventionregressor<-list(coefficient=󰁑shared󰁑,

variable=󰁑secondary󰁑,control=󰁑control󰁑)

22

model<-mtc.model(hfPrevention,

type=\"regression\regressor=regressor,linearModel=\"fixed\")

mtc.network

mtc.networkCreateanmtc.network

Description

Createsanobjectofclassmtc.networkUsage

mtc.network(data.ab=data,treatments=NULL,description=\"Network\

data.re=NULL,studies=NULL,data=NULL)

##S3methodforclass󰁑mtc.network󰁑

plot(x,layout=igraph::layout.circle,dynamic.edge.width=TRUE,use.description=FALSE,...)Arguments

data.ab

Arm-leveldata.Adataframedefiningthearmsofeachstudy,containingthecolumns‘study’and‘treatment’,where‘treatment’mustrefertoanexistingtreatmentIDiftreatmentswerespecified.Furthercolumnsdefinethedataperarm,anddependonthelikelihood/linktobeused.Seemtc.modelforsupportedlikelihood/linksandtheirdatarequirements.

Relativeeffectdata.Adataframedefiningthearmsofeachstudy,containingthecolumns‘study’and‘treatment’,where‘treatment’mustrefertoanexistingtreatmentIDiftreatmentswerespecified.Thecolumn‘diff’specifiesthemeandifferencebetweenthecurrentarmandthebaselinearm;set‘diff=NA’forthebaselinearm.Thecolumn‘std.err’specifiesthestandarderrorofthemeandifference(fornon-baselinearms).Fortrialswithmorethantwoarms,specifythestandarderrorofthemeanofthebaselinearmin‘std.err’,asthisdeterminesthecovarianceofthedifferences.

Optional.Adataframewithcolumns‘id’and‘description’definingthetreat-mentsoravectorgivingthetreatmentIDs.

Optional.Adataframewitha‘study’columnnamingthestudiesandadditionalcolumnscontainingcovariatevalues.Optional.Shortdescriptionofthenetwork.

Deprecated.Arm-leveldata;automaticallyassignedtodata.abifitisnotspeci-fied.Presentforcompatibilitywitholderversions.Anmtc.networkobject.

data.re

treatmentsstudiesdescriptiondatax

layoutAnigraph-compatiblelayout.dynamic.edge.width

IfsettoTRUE,dynamicallysettheedgewidthbasedonthenumberofstudies.

mtc.network

use.description

DisplaytreatmentdescriptionsinsteadoftreatmentIDs.

...Details

One-armtrialsareautomaticallyremoved,whichresultsinawarning.

Additionalargumentspassedtoplot.igraph.

23

Alsoseemtc.data.studyrowforaconvenientwaytoimportdatafromtheone-study-per-rowformat,whichisverypopularforBUGScode.Value

Formtc.network,anobjectoftheclassmtc.networkwhichisalistcontaining:descriptiontreatmentsdata.abdata.restudies

AshortdescriptionofthenetworkAdataframedescribingthetreatments

Adataframecontainingthenetworkdata(arm-level)Adataframecontainingthenetworkdata(relativeeffects)Adataframecontainingstudy-levelinformation(covariates)

Thesearecleanedupandstandardizedversionsoftheargumentsprovided,orgenerateddefaultsfor‘treatments’iftheargumentwasomitted.Author(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

mtc.data.studyrow,mtc.modelExamples

#Createanewnetworkbyspecifyingallinformation.treatments<-read.table(textConnection(󰁑iddescriptionA\"TreatmentA\"B\"TreatmentB\"

C\"TreatmentC\"󰁑),header=TRUE)data<-read.table(textConnection(󰁑

studytreatmentresponderssampleSize01A210001B510002B611002C111003A36003C48003B780󰁑),header=TRUE)

network<-mtc.network(data,description=\"Examplereatments=treatments)plot(network)

24mtc.nodesplit

#Createanewnetworkbyspecifyingonlythedata.data<-read.table(textConnection(󰁑

studytreatmentmeanstd.devsampleSize01A-1.120.61501B-1.550.51602A-0.80.73302B-1.10.531󰁑),header=TRUE)network<-mtc.network(data)

#Printthenetworkprint(network)

##MTCdataset:Network

##studytreatmentmeanstd.devsampleSize##11A-1.120.615##21B-1.550.516##32A-0.800.733##42B-1.100.531

mtc.nodesplitNode-splittinganalysisofinconsistency

Description

Generateandrunanensembleofnode-splittingmodels,resultsofwhichcanbejointlysummarizedandplotted.Usage

mtc.nodesplit(network,comparisons=mtc.nodesplit.comparisons(network),...)mtc.nodesplit.comparisons(network)Arguments

networkcomparisons...

AnobjectofS3classmtc.network.

Dataframespecifyingthecomparisonstobesplit.Theframehastwocolumns:’t1’and’t2’.

Argumentstobepassedtomtc.runormtc.model.Thiscanbeusedtosetthelikelihood/linkorthenumberofiterations,forexample.

Details

mtc.nodesplitreturnstheMCMCresultsforallrelevantnode-splittingmodels[vanValkenhoefetal.2015].Togetappropriatesummarystatistics,callsummary()ontheresultsobject.Thesummarycanbeplotted.Seemtc.modelfordetailsonhowthenode-splittingmodelsaregenerated.TocontrolparametersoftheMCMCestimation,seemtc.run.Tospecifythelikelihood/linkortocontrolothermodelparameters,seemtc.model.The...argumentsarefirstmatchedagainstmtc.run,andthosethatdonotmatcharepassedtomtc.model.

mtc.nodesplit25

mtc.nodesplit.comparisonsreturnsadataframeenumeratingallcomparisonsthatcanreason-ablybesplit(i.e.haveindependentindirectevidence).Value

Formtc.nodesplit:anobjectofclassmtc.nodesplit.Thisisalistwiththefollowingelements:d.X.Yconsistency

Foreachcomparison(t1=X,t2=Y),theMCMCresultsTheconsistencymodelresults

Forsummary:anobjectofclassmtc.nodesplit.summary.Thisisalistwiththefollowingele-ments:dir.effectind.effectcons.effectp.valuecons.modelAuthor(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

mtc.modelmtc.runExamples

#Runallrelevantnode-splittingmodels

##Notrun:result.ns<-mtc.nodesplit(parkinson,thin=50)#(readresultsfromfileinsteadofrunning:)

result.ns<-readRDS(system.file(󰁑extdata/parkinson.ns.rds󰁑,package=󰁑gemtc󰁑))#Listtheindividualmodelsnames(result.ns)

#Timeseriesplotsandconvergencediagnosticsford.A.Cmodelplot(result.ns$d.A.C)

gelman.diag(result.ns$d.A.C,multivariate=FALSE)#Overallsummaryandplot

summary.ns<-summary(result.ns)print(summary.ns)plot(summary.ns)

SummaryofdirecteffectsforeachsplitcomparisonSummaryofindirecteffectsforeachsplitcomparison

SummaryofconsistencymodeleffectsforeachsplitcomparisonInconsistencyp-valuesforeachsplitcomparisonThegeneratedconsistencymodel

26mtc.run

mtc.runRunninganmtc.modelusinganMCMCsampler

Description

Thefunctionmtc.runisusedtogeneratesamplesfromaobjectoftypemtc.modelusingaMCMCsampler.Theresultingmtc.resultobjectcanbecoercedtoanmcmc.listforfurtheranalysisofthedatasetusingthecodapackage.Usage

mtc.run(model,sampler=NA,n.adapt=5000,n.iter=20000,thin=1)##S3methodforclass󰁑mtc.result󰁑summary(object,...)

##S3methodforclass󰁑mtc.result󰁑plot(x,...)

##S3methodforclass󰁑mtc.result󰁑forest(x,use.description=FALSE,...)##S3methodforclass󰁑mtc.result󰁑print(x,...)

##S3methodforclass󰁑mtc.result󰁑as.mcmc.list(x,...)Arguments

modelsampler

AnobjectofS3classmtc.modeldescribinganetworkmeta-analysismodel.Deprecated:gemtcnowonlysupportstheJAGSsampler.Specifyingasam-plerwillresultinawarningorerror.Thisargumentwillberemovedinfutureversions.

Amountofadaptation(ortuning)iterations.Amountofsimulationiterations.Thinningfactor.

ObjectofS3classmtc.result.

n.adaptn.iterthinobject

xObjectofS3classmtc.result.use.description

DisplaytreatmentdescriptionsinsteadoftreatmentIDs....Value

Anobjectofclassmtc.result.Thisisalistwiththefollowingelements:samplesmodel

ThesamplesresultingfromrunningtheMCMCmodel,inmcmc.listformat.Themtc.modelusedtoproducethesamples.Additionalarguments.

mtc.run

deviance

27

Residualdeviancestatistics,alistwiththefollowingelements.DIC:devianceinformationcriterionatresidual(Dbar+pD).Dbar:meansumofresidualde-viance.pD:sumofleverage,alsoknownastheeffectivenumberofparam-eters.dev.ab:meanposteriorresidualdevianceofeacharm(forarm-baseddata).fit.ab:devianceattheposteriormeanoftefittedvalues(forarm-baseddata).dev.re:meanposteriorresidualdevianceofeachstudy(forrelative-effectdata).fit.re:devianceattheposteriormeanofthefittedvalues(forrelative-effectdata).

Theobjectcanbecoercedtoanmcmc.listfromthecodapackagebythegenericS3methodas.mcmc.list.Analysisoftheresults

Convergenceofthemodelcanbeassessedusingmethodsfromthecodapackage.ForexampletheBrooks-Gelman-Rubinmethod(coda::gelman.diag,coda::gelman.plot).Thesummaryalsoprovidesusefulinformation,suchastheMCMCerrorandthetimeseriesanddensitiesgivenbyplotshouldalsobeinspected.

Theforestfunctioncanprovideforestplotsformtc.resultobjects.Thisisespeciallyusefulincombinationwiththerelative.effectfunctionthatcanbeusedtocalculaterelativeeffectscomparedtoanybaselineforconsistencymodels.Therank.probabilityfunctioncalculatesrankprobabilitiesforconsistencymodels.Author(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

mtc.model

relative.effect.table,relative.effect,rank.probabilitycoda::gelman.diag,coda::gelman.plotExamples

model<-mtc.model(smoking)

##Notrun:results<-mtc.run(model,thin=10)

results<-dget(system.file(\"extdata/luades-smoking.samples.gz\package=\"gemtc\"))#Convergencediagnosticsgelman.plot(results)

#Posteriorsummariessummary(results)

##Iterations=5010:25000##Thinninginterval=10##Numberofchains=4

##Samplesizeperchain=2000##

28

################################

1.Empiricalmeanandstandarddeviationforeachvariable,

plusstandarderrorofthemean:Mean

d.A.B0.4965d.A.C0.8359d.A.D1.1088sd.d0.8465

SD0.40810.24330.43550.1913

NaiveSETime-seriesSE0.0045630.00490.0027200.0031470.0048690.0052800.0021390.002965

parkinson

2.Quantilesforeachvariable:2.5%

d.A.B-0.2985d.A.C0.3878d.A.D0.2692sd.d0.5509

25%

0.23120.67200.81970.7119

50%0.49100.82731.09830.8180

75%0.75300.98671.38240.92

97.5%1.3411.3532.0061.283

plot(results)#Showstime-seriesanddensityplotsofthesamplesforest(results)#Showsaforestplot

parkinsonMeanoff-timereductioninParkinson’sdisease

Description

AdatasetofseventrialsinvestigatingfourtreatmentsandplaceboforParkinson’sdisease.Theoutcomeismeanoff-timereduction.Format

•parkinson:Anetworkmeta-analysisdatasetcontainingfifteenrowsofarm-baseddata(mean,standarddeviation,andsamplesize).

•parkinson_diff:Anetworkmeta-analysisdatasetcontainingfifteenrowsofcontrast-baseddata.

•parkinson_shared:Anetworkmeta-analysisdatasetcontainingmixedarm-basedandcontrast-baseddata.

Source

Franchinietal.(2012),Accountingforcorrelationinnetworkmeta-analysiswithmulti-armtrials,ResearchSynthesisMethods,3(2):142-160.[doi:10.1002/jrsm.1049]

plotCovariateEffect29

plotCovariateEffectPlottreatmenteffectsversuscovariatevalues

Description

Theplotwillshowthemediantreatmenteffectandthe95%credibleintervalonthey-axisandthecovariatevalueonthex-axis.Oneplotpagewillbegeneratedperpairoftreatments.Usage

plotCovariateEffect(result,t1,t2,xlim=NULL,ylim=NULL,

ask=dev.interactive(orNone=TRUE))Arguments

resultt1t2

Resultsobject-createdbymtc.result

Alistofbaselinetreatmentstocalculatetreatmenteffectsagainst.Willbeex-tendedtomatchthelengthoft2.

Alistoftreatmentstocalculatetheeffectsfor.Willbeextendedtomatchthelengthoft1.Ifleftemptyandt1isasingletreatment,effectsofalltreatmentsexceptt1willbecalculated.Thex-axislimits.They-axislimits.

IfTRUE,apromptwillbedisplayedbeforegeneratingthenextpageofamulti-pageplot.

xlimylimask

Details

Defaultx-axislimitswillbesettothreestandarddeviationsaboveandbelowthecenteringvalueofthecovariate.They-axislimitswillbesetbasedontheminimumandmaximum95%CrIlimitsamongthesetofeffectscomputed.Value

None.Author(s)

GertvanValkenhoefSeeAlso

relative.effect,mtc.run

30rank.probability

rank.probabilityCalculatingrank-probabilities

Description

Rankprobabilitiesindicatetheprobabilityforeachtreatmenttobebest,secondbest,etc.Usage

rank.probability(result,preferredDirection=1,covariate=NA)##S3methodforclass󰁑mtc.rank.probability󰁑print(x,...)

##S3methodforclass󰁑mtc.rank.probability󰁑plot(x,...)Arguments

result

ObjectofS3classmtc.resulttobeusedincreationoftherankprobabilitytable

preferredDirection

Preferentialdirectionoftheoutcome.Set1ifhighervaluesarepreferred,-1iflowervaluesarepreferred.covariatex...Details

ForeachMCMCiteration,thetreatmentsarerankedbytheireffectrelativetoanarbitrarybaseline.Afrequencytableisconstructedfromtheserankingsandnormalizedbythenumberofiterationstogivetherankprobabilities.Value

Amatrix(withclassmtc.rank.probability)withthetreatmentsasrowsandtheranksascolumns.Author(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

relative.effect

(Regressionanalysesonly)Valueofthecovariateatwhichtocomputerankprobabilities.

AnobjectofS3classrank.probability.Additionalarguments.

read.mtc.networkExamples

model<-mtc.model(smoking)

#Tosavecomputationtimeweloadthesamplesinsteadofrunningthemodel##Notrun:results<-mtc.run(model)

results<-dget(system.file(\"extdata/luades-smoking.samples.gz\package=\"gemtc\"))ranks<-rank.probability(results)print(ranks)

##Rankprobability;preferreddirection=1##[,1][,2][,3][,4]##A0.0000000.0030000.1051250.1875##B0.0578750.1758750.6615000.104750##C0.2282500.6005000.1708750.000375##D0.7138750.2206250.0625000.003000plot(ranks)#plotacumulativerankplot

plot(ranks,beside=TRUE)#plota󰁑rankogram󰁑

31

read.mtc.networkReadmtc.networkfromlegacyGeMTCXMLfiles(.gemtc)

Description

ReadlegacyGeMTCXML(.gemtc)files.Usage

read.mtc.network(file)Arguments

fileDetails

read.mtc.networkexiststomigratedatafromtheolderGeMTCXMLformat,andrequirestheXMLpackagetobeinstalled.

SupportforwritingXMLfileshasbeenremoved.Instead,usenativeRmethodstoreadandwritenetworks(e.g.save/loadordput/dget).Value

read.mtc.networkreturnsanobjectofS3classmtc.network.Author(s)

GertvanValkenhoef

Pathtothefiletoread(read.mtc.network).

32SeeAlso

mtc.networkExamples

#ReadanexampleGeMTCXMLfile

file<-system.file(\"extdata/luades-smoking.gemtc\package=\"gemtc\")network<-read.mtc.network(file)

#Summarizethenetwork(generatesomeinterestingnetworkproperties)summary(network)##$Description

##[1]\"MTCdataset:Smokingcessationrates\"##

##$󰁒Studiespertreatment󰁒##ABCD##196196##

##$󰁒Numberofn-armstudies󰁒##2-arm3-arm##222

relative.effect

relative.effectCalculatingrelativeeffects

Description

Calculatestherelativeeffectsofpairsoftreatments.Usage

relative.effect(result,t1,t2=c(),preserve.extra=TRUE,covariate=NA)Arguments

resultt1t2

AnobjectofS3classmtc.resulttoderivetherelativeeffectsfrom.

Alistofbaselinestocalculatearelativeeffectsagainst.Willbeextendedto

matchthelengthoft2.

Alistoftreatmentstocalculatetherelativeeffectsfor.Willbeextendedtomatchthelengthoft1.Ifleftemptyandt1isasingletreatment,relativeeffectsofalltreatmentsexceptt1willbecalculated.

(Regressionanalysesonly)Valueofthecovariateatwhichtocomputerelativeeffects.

preserve.extraIndicateswhethertopreserveextraparameterssuchasthesd.d.covariate

relative.effectValue

Returnsanmtc.resultsobjectcontainingthecalculatedrelativeeffects.

33

Notethatthismethodstorestherawsamples,whichmayresultinexcessivememoryusage.Youmaywanttoconsiderusingrelative.effect.tableinstead.Author(s)

GertvanValkenhoef,JoëlKuiperSeeAlso

rank.probability,relative.effect.tableExamples

model<-mtc.model(smoking)

#Tosavecomputationtimeweloadthesamplesinsteadofrunningthemodel##Notrun:results<-mtc.run(model)

results<-dget(system.file(\"extdata/luades-smoking.samples.gz\package=\"gemtc\"))#Createsaforestplotoftherelativeeffectsforest(relative.effect(results,\"A\"))

summary(relative.effect(results,\"B\c(\"A\\"C\\"D\")))##Iterations=5010:25000##Thinninginterval=10##Numberofchains=4

##Samplesizeperchain=2000##

##1.Empiricalmeanandstandarddeviationforeachvariable,##plusstandarderrorofthemean:####MeanSDNaiveSETime-seriesSE##d.B.A-0.49650.40810.0045630.0049##d.B.C0.33940.41440.0046340.004859##d.B.D0.61230.470.00530.005297##sd.d0.84650.19130.0021390.002965##

##2.Quantilesforeachvariable:####2.5%25%50%75%97.5%##d.B.A-1.3407-0.7530-0.4910-0.23120.2985##d.B.C-0.48090.07440.34110.59771.1702##d.B.D-0.30830.30050.60440.91521.5790##sd.d0.55090.71190.81800.921.2827

34relative.effect.table

relative.effect.tableTableofrelativeeffects

Description

Generatesatableoftherelativeeffectsofallpairsoftreatments.Unlikerelative.effect,thismethodstoressummariesonly,notrawsamples.Usage

relative.effect.table(result,covariate=NA)##S3methodforclass󰁑mtc.relative.effect.table󰁑print(x,...)

##S3methodforclass󰁑mtc.relative.effect.table󰁑forest(x,t1,use.description=FALSE,...)

##S3methodforclass󰁑mtc.relative.effect.table󰁑as.data.frame(x,...)Arguments

resultcovariatex

AnobjectofS3classmtc.resulttoderivetherelativeeffectsfrom.

(Regressionanalysesonly)Valueofthecovariateatwhichtocomputerelativeeffects.

AnobjectofS3classmtc.relative.effect.table.

t1BaselinetreatmentfortheForestplot.use.description

DisplaytreatmentdescriptionsinsteadoftreatmentIDs....Value

Returnsanmtc.relative.effect.tableobjectcontainingthequantilesofthecalculatedrelativeeffectsofallpair-wisecomparisonsamongthetreatments.

Theresultwillbeprettyprintedasann-by-ntableofrelativetreatmenteffects.ItcanalsobeusedtoproduceForestplotsagainstanyarbitrarybaseline.Finally,theas.data.framegenericmethodmakesitpossibletoexportthetableforuseinExcelorotherspreadsheetsoftware,usingthecoreRmethodswrite.csvorwrite.csv2.Author(s)

GertvanValkenhoefSeeAlso

relative.effect

Additionalarguments.

smokingExamples

model<-mtc.model(smoking)

#Tosavecomputationtimeweloadthesamplesinsteadofrunningthemodel##Notrun:results<-mtc.run(model)

results<-dget(system.file(\"extdata/luades-smoking.samples.gz\package=\"gemtc\"))#Createsaforestplotoftherelativeeffectstbl<-relative.effect.table(results)#Printthen*ntableprint(tbl)

#Ploteffectrelativetotreatment\"C\"forest(tbl,\"C\")

#WritetoCSV(e.g.toimporttoExcel,thenuseinaWordtable)write.csv(tbl,\"smoking-effects.csv\")

#Note:usewrite.csv2forWesternEuropeanlocales

35

smokingPsychologicaltreatmentstoaidsmokingcessation

Description

Adatasetof24trialsinvestigatingfourpsychologicaltreatmentsandnotreatmentforsmokingcessation.

Format

Anetworkmeta-analysisdatasetcontaining50rowsofarm-baseddata(respondersandsamplesize).

Source

LuandAdes(2006),AssessingEvidenceInconsistencyinMixedTreatmentComparisons,JournaloftheAmericanStatisticalSociety,101(474):447-459.[doi:10.1198/016214505000001302]Hasselblad(1998),Meta-analysisofmultitreatmentstudies,MedicalDecisionMaking18(1):37-43.[doi:10.1177/02729X9801800110]

36thrombolytic

thrombolyticThrombolytictreatmentafteracutemyocardialinfarction

Description

Adatasetof28trialsinvestigatingeightthrombolytictreatmentsadministeredafteramyocardialinfarction.Theoutcomeismortalityafter30-35days.Format

Anetworkmeta-analysisdatasetcontaining58rowsofarm-baseddata(respondersandsamplesize).Source

LuandAdes(2006),AssessingEvidenceInconsistencyinMixedTreatmentComparisons,JournaloftheAmericanStatisticalSociety,101(474):447-459.[10.1198/016214505000001302]

Bolandetal.(2003),Earlythrombolysisforthetreatmentofacutemyocardialinfarction:asystem-aticreviewandeconomicevaluation,HealthTechnologyAssessment7(15):1-136.[doi:10.3310/hta7150]

Index

[Diaset[Diasetal.al.2010,vanValkenhoefet

al.2015]2013a,,19

vanValkenhoefet

[Dias[Diasetal.etal.2012]2013a],19

,19

[Turneral.al.(draft)]2013b,van,Valkenhoefet

[Warn[van[vanValkenhoefetetal.al.2002]2012],19

17Valkenhoefet,19

etal.al.(draft)]2014b(draft)],19,

13

[vanValkenhoefetal.2015],24as.data.frame.mtc.relative.effect.table

(relative.effect.table),34

as.mcmc.list.mtc.resultatrialFibrillation,4,20(mtc.run),26blobbogramblocker,8,5certolizumab,8,20depressiondietfat,10

,9forestforest.mtc.relative.effect.table

(blobbogram),5

(relative.effect.table),34

forest.mtc.result(mtc.run),26Gelmangemtcgemtc-package(gemtc-packageetal.(2008),2),,219hfPrevention,10,20ll.call,11

mtc(gemtc-package),2

37

mtc.anohemtc.data.studyrow,12

mtc.deviancemtc.devplot,15,16

,14,23mtc.hy.empirical.lor(mtc.deviance),15

mtc.hy.priormtc.levplot,(mtc.hy.prior),16mtc.modelmtc.network,3,(12mtc.deviance16,18

,13,16,17,18),15

,22–25,27mtc.nodesplit,3,13–15,21,22,24,mtc.resultmtc.result,16

,2432mtc.run,3,13(mtc.run,16,21,),2426

,25,26,29parkinsonparkinson_diff,28

parkinson_shared(parkinsonplot.mtc.anohe(parkinson),28plot.mtc.deviance(mtc.anoheplot.mtc.model(mtc.deviance),12

),28),plot.mtc.network(mtc.model),18

15plot.mtc.nodesplit(mtc.network),22plot.mtc.rank.probability

(mtc.nodesplit),24(rank.probability),30

plot.mtc.resultplotCovariateEffect(mtc.run),26print.mtc.anohe,29

print.mtc.model(print.mtc.nodesplit(mtc.anohemtc.model),12print.mtc.rank.probability

(mtc.nodesplit),18

),24(rank.probability),30

print.mtc.relative.effect.table

(relative.effect.table),34

print.mtc.result(mtc.run),26rank.probabilityread.mtc.network,27,30,33relative.effectrelative.effect.table,,2731

,29,,3027,,3233,,3434

38

smoking,35

summary.mtc.anohe(mtc.anohe),12summary.mtc.model(mtc.model),18

summary.mtc.nodesplit(mtc.nodesplit),

24

summary.mtc.result(mtc.run),26thrombolytic,36

INDEX

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- igat.cn 版权所有 赣ICP备2024042791号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务