Skip to contents

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.000000000 10.000000 10.000000 10.000000
#>  [2,]    1  9.910659  9.523208866  9.860947  9.499228  9.315165
#>  [3,]    2  9.822264  9.058025243  9.733227  9.033056  8.676228
#>  [4,]    3  9.734816  8.604449132  9.616840  8.601486  8.083189
#>  [5,]    4  9.648314  8.162480532  9.511785  8.204517  7.536047
#>  [6,]    5  9.562758  7.732119443  9.418063  7.842149  7.034802
#>  [7,]    6  9.478149  7.313365865  9.335674  7.514382  6.579455
#>  [8,]    7  9.394486  6.906219799  9.264617  7.221216  6.170005
#>  [9,]    8  9.311770  6.510681244  9.204893  6.962651  5.806453
#> [10,]    9  9.230000  6.126750200  9.156502  6.738687  5.488798
#> [11,]   10  9.149176  5.754426668  9.119443  6.549324  5.217041
#> [12,]   11  9.069298  5.393710646  9.093717  6.394562  4.991181
#> [13,]   12  8.990367  5.044602136  9.079324  6.274402  4.811218
#> [14,]   13  8.912383  4.707101138  9.076263  6.188842  4.677154
#> [15,]   14  8.835345  4.381207650  9.084535  6.137883  4.588986
#> [16,]   15  8.759253  4.066921674  9.104139  6.121526  4.546716
#> [17,]   16  8.684107  3.764243209  9.135077  6.139770  4.550344
#> [18,]   17  8.609908  3.473172255  9.177347  6.192614  4.599869
#> [19,]   18  8.536655  3.193708813  9.230949  6.280060  4.695291
#> [20,]   19  8.464349  2.925852882  9.295884  6.402107  4.836611
#> [21,]   20  8.392989  2.669604462  9.372152  6.558755  5.023829
#> [22,]   21  8.322575  2.424963553  9.459753  6.750004  5.256944
#> [23,]   22  8.253108  2.191930156  9.558686  6.975854  5.535956
#> [24,]   23  8.184587  1.970504270  9.668952  7.236305  5.860866
#> [25,]   24  8.117012  1.760685895  9.790551  7.531357  6.231673
#> [26,]   25  8.050384  1.562475032  9.923482  7.861011  6.648378
#> [27,]   26  7.984702  1.375871680 10.067746  8.225265  7.110980
#> [28,]   27  7.919967  1.200875839 10.223342  8.624120  7.619480
#> [29,]   28  7.856178  1.037487509 10.390272  9.057577  8.173877
#> [30,]   29  7.793335  0.885706690 10.568533  9.525634  8.774172
#> [31,]   30  7.731439  0.745533383 10.758128 10.028293  9.420364
#> [32,]   31  7.670489  0.616967587 10.959055 10.565553 10.112454
#> [33,]   32  7.610485  0.500009303 11.171315 11.137413 10.850441
#> [34,]   33  7.551428  0.394658529 11.394908 11.743875 11.634325
#> [35,]   34  7.493317  0.300915267 11.629833 12.384938 12.464107
#> [36,]   35  7.436153  0.218779516 11.876091 13.060602 13.339787
#> [37,]   36  7.379934  0.148251277 12.133681 13.770867 14.261364
#> [38,]   37  7.324663  0.089330549 12.402604 14.515733 15.228838
#> [39,]   38  7.270337  0.042017332 12.682860 15.295200 16.242210
#> [40,]   39  7.216958  0.006311626 12.974449 16.109269 17.301480
#> [41,]   40  7.164526 -0.017786569 13.277370 16.957938 18.406647
#> [42,]   41  7.113039 -0.030277252 13.591624 17.841208 19.557711
#> [43,]   42  7.062500 -0.031160424 13.917210 18.759080 20.754673
#> [44,]   43  7.012906 -0.020436084 14.254129 19.711552 21.997532
#> [45,]   44  6.964259  0.001895766 14.602381 20.698626 23.286289
#> [46,]   45  6.916558  0.035835128 14.961966 21.720301 24.620943
#> [47,]   46  6.869804  0.081382001 15.332883 22.776576 26.001495
#> [48,]   47  6.823996  0.138536385 15.715133 23.867453 27.427944
#> [49,]   48  6.779134  0.207298281 16.108715 24.992931 28.900291
#> [50,]   49  6.735219  0.287667688 16.513630 26.153010 30.418535
#> [51,]   50  6.692250  0.379644606 16.929878 27.347690 31.982676
# }