Learn R Programming

MBNMAtime (version 0.2.4)

summary.mb.predict: Prints summary of mb.predict object

Description

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, ...)

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.

Arguments

object

An object of class "mb.predict"

...

further arguments passed to or from other methods

Examples

Run this code
# \donttest{
# Define network
network <- mb.network(obesityBW_CFB, reference="plac")

# 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)

# 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)

# Generate summary of predictions
summary(pred)
# }

Run the code above in your browser using DataLab