Skip to contents

Prints a summary table of the mean of MCMC iterations at each time point for each treatment

Usage

# S3 method for class '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.910658  9.52113531  9.860406  9.496127  9.316951
#>  [3,]    2  9.822262  9.05410328  9.732131  9.027310  8.679582
#>  [4,]    3  9.734813  8.59890392  9.615174  8.593549  8.087893
#>  [5,]    4  9.648310  8.15553723  9.509536  8.194844  7.541884
#>  [6,]    5  9.562754  7.72400320  9.415217  7.831196  7.041555
#>  [7,]    6  9.478144  7.30430185  9.332216  7.502604  6.586906
#>  [8,]    7  9.394480  6.89643316  9.260533  7.209068  6.177936
#>  [9,]    8  9.311763  6.50039713  9.200170  6.950588  5.814646
#> [10,]    9  9.229992  6.11619378  9.151124  6.727165  5.497037
#> [11,]   10  9.149168  5.74382309  9.113398  6.538798  5.225107
#> [12,]   11  9.069290  5.38328506  9.086990  6.385487  4.998857
#> [13,]   12  8.990358  5.03457971  9.071900  6.267232  4.818287
#> [14,]   13  8.912373  4.69770702  9.068129  6.184033  4.683396
#> [15,]   14  8.835334  4.37266700  9.075677  6.135891  4.594186
#> [16,]   15  8.759242  4.05945964  9.094543  6.122805  4.550655
#> [17,]   16  8.684096  3.75808496  9.124728  6.144775  4.552805
#> [18,]   17  8.609896  3.46854294  9.166232  6.201802  4.600634
#> [19,]   18  8.536643  3.19083359  9.219054  6.293884  4.694143
#> [20,]   19  8.464337  2.92495690  9.283194  6.421023  4.833332
#> [21,]   20  8.392976  2.67091288  9.358653  6.583218  5.018201
#> [22,]   21  8.322563  2.42870153  9.445431  6.780469  5.248750
#> [23,]   22  8.253095  2.19832285  9.543527  7.012777  5.524978
#> [24,]   23  8.184574  1.97977683  9.652942  7.280141  5.846887
#> [25,]   24  8.116999  1.77306348  9.773676  7.582561  6.214475
#> [26,]   25  8.050371  1.57818280  9.905728  7.920037  6.627744
#> [27,]   26  7.984689  1.39513478 10.049099  8.292569  7.086692
#> [28,]   27  7.919954  1.22391943 10.203788  8.700158  7.591320
#> [29,]   28  7.856165  1.06453675 10.369796  9.142803  8.141628
#> [30,]   29  7.793323  0.91698673 10.547122  9.620504  8.737615
#> [31,]   30  7.731426  0.78126939 10.735767 10.133261  9.379283
#> [32,]   31  7.670477  0.65738471 10.935730 10.681074 10.066630
#> [33,]   32  7.610473  0.54533269 11.147013 11.263944 10.799658
#> [34,]   33  7.551416  0.44511335 11.369613 11.881870 11.578365
#> [35,]   34  7.493306  0.35672667 11.603533 12.534852 12.402752
#> [36,]   35  7.436142  0.28017266 11.848770 13.222891 13.272819
#> [37,]   36  7.379924  0.21545131 12.105327 13.945986 14.188566
#> [38,]   37  7.324653  0.16256263 12.373202 14.704136 15.149993
#> [39,]   38  7.270328  0.12150662 12.652395 15.497344 16.157100
#> [40,]   39  7.216950  0.09228328 12.942908 16.325607 17.209886
#> [41,]   40  7.164518  0.07489260 13.244738 17.188926 18.308353
#> [42,]   41  7.113032  0.06933459 13.557888 18.087302 19.452499
#> [43,]   42  7.062493  0.07560925 13.882356 19.020734 20.642325
#> [44,]   43  7.012900  0.09371657 14.218142 19.989222 21.877831
#> [45,]   44  6.964254  0.12365657 14.565247 20.992767 23.159017
#> [46,]   45  6.916554  0.16542923 14.923671 22.031368 24.485883
#> [47,]   46  6.869800  0.21903455 15.293413 23.105025 25.858428
#> [48,]   47  6.823993  0.28447254 15.674474 24.213738 27.276654
#> [49,]   48  6.779132  0.36174320 16.066853 25.357507 28.740559
#> [50,]   49  6.735218  0.45084653 16.470551 26.536333 30.250145
#> [51,]   50  6.692250  0.55178253 16.885568 27.750214 31.805410
# }