Prints summary of mb.predict object
summary.mb.predict.Rd
Prints a summary table of the mean of MCMC iterations at each time point for each treatment
Usage
# S3 method for mb.predict
summary(object, ...)
Arguments
- object
An object of class
"mb.predict"
- ...
further arguments passed to or from other methods
Value
A matrix containing times at which responses have been predicted (time
)
and an additional column for each treatment for which responses have been predicted.
Each row represents mean MCMC predicted responses for each treatment at a particular
time.
Examples
# \donttest{
# Define network
network <- mb.network(obesityBW_CFB, reference="plac")
#> Studies reporting change from baseline automatically identified from the data
# Run an MBNMA with a quadratic time-course function
quad <- mb.run(network,
fun=tpoly(degree=2, pool.1="rel", method.1="common",
pool.2="rel", method.2="common"),
intercept=TRUE)
#> Compiling model graph
#> Resolving undeclared variables
#> Allocating nodes
#> Graph information:
#> Observed stochastic nodes: 648
#> Unobserved stochastic nodes: 155
#> Total graph size: 11509
#>
#> Initializing model
#>
# Predict responses
pred <- predict(quad, times=c(0:50), treats=c(1:5),
ref.resp = network$data.ab[network$data.ab$treatment==1,],
E0=10)
#> Data frame must contain only data from reference treatment
#> Studies reporting change from baseline automatically identified from ref.resp
#> Compiling model graph
#> Resolving undeclared variables
#> Allocating nodes
#> Graph information:
#> Observed stochastic nodes: 264
#> Unobserved stochastic nodes: 2
#> Total graph size: 4193
#>
#> Initializing model
#>
# Generate summary of predictions
summary(pred)
#> time plac amfe_75MG dexf_10MG dexf_30MG dexf_60MG
#> [1,] 0 10.000000 10.00000000 10.000000 10.000000 10.000000
#> [2,] 1 9.910655 9.52503406 9.858503 9.496888 9.316941
#> [3,] 2 9.822257 9.06149684 9.728635 9.028670 8.679602
#> [4,] 3 9.734805 8.60938835 9.610395 8.595346 8.087982
#> [5,] 4 9.648300 8.16870858 9.503785 8.196916 7.542082
#> [6,] 5 9.562741 7.73945754 9.408803 7.833380 7.041901
#> [7,] 6 9.478129 7.32163523 9.325451 7.504739 6.587439
#> [8,] 7 9.394463 6.91524165 9.253727 7.210991 6.178696
#> [9,] 8 9.311743 6.52027679 9.193632 6.952138 5.815673
#> [10,] 9 9.229970 6.13674066 9.145166 6.728179 5.498369
#> [11,] 10 9.149144 5.76463325 9.108329 6.539114 5.226785
#> [12,] 11 9.069264 5.40395457 9.083121 6.384943 5.000920
#> [13,] 12 8.990330 5.05470462 9.069542 6.265666 4.820774
#> [14,] 13 8.912343 4.71688339 9.067591 6.181283 4.686348
#> [15,] 14 8.835302 4.39049089 9.077270 6.131794 4.597640
#> [16,] 15 8.759207 4.07552712 9.098577 6.117199 4.554653
#> [17,] 16 8.684059 3.77199207 9.131514 6.137499 4.557384
#> [18,] 17 8.609858 3.47988575 9.176079 6.192693 4.605835
#> [19,] 18 8.536603 3.19920816 9.232273 6.282780 4.700005
#> [20,] 19 8.464294 2.92995929 9.300096 6.407762 4.839895
#> [21,] 20 8.392932 2.67213915 9.379548 6.567638 5.025503
#> [22,] 21 8.322516 2.42574773 9.470629 6.762408 5.256832
#> [23,] 22 8.253047 2.19078504 9.573339 6.992072 5.533879
#> [24,] 23 8.184524 1.96725108 9.687678 7.256630 5.856646
#> [25,] 24 8.116948 1.75514585 9.813645 7.556083 6.225132
#> [26,] 25 8.050318 1.55446934 9.951242 7.890429 6.639338
#> [27,] 26 7.984634 1.36522156 10.100467 8.259670 7.099263
#> [28,] 27 7.919897 1.18740250 10.261321 8.663804 7.604907
#> [29,] 28 7.856107 1.02101217 10.433805 9.102833 8.156270
#> [30,] 29 7.793263 0.86605057 10.617917 9.576756 8.753353
#> [31,] 30 7.731365 0.72251769 10.813658 10.085573 9.396155
#> [32,] 31 7.670414 0.59041354 11.021028 10.629284 10.084677
#> [33,] 32 7.610409 0.46973812 11.240027 11.207889 10.818918
#> [34,] 33 7.551350 0.36049142 11.470654 11.821389 11.598878
#> [35,] 34 7.493239 0.26267345 11.712911 12.469782 12.424557
#> [36,] 35 7.436073 0.17628421 11.966796 13.153069 13.295956
#> [37,] 36 7.379854 0.10132369 12.232311 13.871251 14.213075
#> [38,] 37 7.324581 0.03779190 12.509454 14.624327 15.175912
#> [39,] 38 7.270255 -0.01431117 12.798226 15.412297 16.184469
#> [40,] 39 7.216876 -0.05498550 13.098628 16.235161 17.238745
#> [41,] 40 7.164442 -0.08423112 13.410658 17.092919 18.338741
#> [42,] 41 7.112956 -0.10204800 13.734316 17.985571 19.484456
#> [43,] 42 7.062415 -0.10843616 14.069604 18.913117 20.675890
#> [44,] 43 7.012821 -0.10339559 14.416521 19.875557 21.913043
#> [45,] 44 6.964174 -0.08692630 14.775067 20.872892 23.195916
#> [46,] 45 6.916473 -0.05902828 15.145241 21.905120 24.524508
#> [47,] 46 6.869718 -0.01970153 15.527045 22.972243 25.898820
#> [48,] 47 6.823910 0.03105394 15.920477 24.074260 27.318851
#> [49,] 48 6.779048 0.09323815 16.325538 25.211171 28.784601
#> [50,] 49 6.735133 0.16685107 16.742228 26.382976 30.296071
#> [51,] 50 6.692164 0.25189273 17.170548 27.589675 31.853260
# }