Description Usage Arguments Details Value Examples
Used to predict responses for different doses of agents or to predict the results of a new study. This is calculated by combining relative treatment effects with a given reference treatment response (specific to the population of interest).
1 2 3 4 5 6 7 8 9 10 
object 
An S3 object of class 
n.doses 
A number indicating the number of doses at which to make predictions
within each agent. The default is 
max.doses 
A list of numbers. Each named element in the list corresponds to an
agent (either named similarly to agent names given in the data, or named
correspondingly to the codes for agents given in 
exact.doses 
A list of numeric vectors. Each named element in the list correponds to an
agent (either named similarly to agent names given in the data, or named
correspondingly to the codes for agents given in 
E0 
An object to indicate the value(s) to use for the response at dose = 0 (i.e.
placebo) in the prediction. This can take a number of different formats depending
on how it will be used/calculated. The default is

synth 
A character object that can take the value 
... 
Arguments to be sent to 
The range of doses on which to make predictions can be specified in one of two ways:
Use max.dose
and n.doses
to specify the maximum dose for each agent and the
number of doses within that agent for which to predict responses. Doses will be chosen
that are equally spaced from zero to the maximum dose for each agent. This is useful
for generating plots of predicted responses (using [plotmbnma.predict]
) as it will
lead to fitting a smooth doseresponse curve (provided n.doses
is sufficiently high).
Use exact.doses
to specify the exact doses for which to predict responses for each
agent. This may be more useful when ranking different predicted responses using
[rankmbnma.predict]
An S3 object of class mbnma.predict
that contains the following
elements:
summary
A named list of data frames. Each data frame contains
a summary of predicted responses at followup times specified in times
for each treatment specified in treats
pred.mat
A named list of
matrices. Each matrix contains the MCMC results of predicted responses at
followup times specified in times
for each treatment specified in
treats
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64  # Using the triptans data
network < mbnma.network(HF2PPITT)
# Run an Emax doseresponse MBNMA
emax < mbnma.emax(network, emax="rel", ed50="rel", method="random")
###########################
###### Specifying E0 ######
###########################
#### Predict responses using deterministic value for E0 ####
# Data is binomial so we specify E0 on the natural scale as a probability
pred < predict(emax, E0 = 0.2)
# Specifying nonsensical values will return an error
#pred < predict(emax, E0 = 10)
### ERROR ###
#### Predict responses using stochastic value for E0 ####
# Data is binomial so we might want to draw from a beta distribution
pred < predict(emax, E0 = "rbeta(n, shape1=1, shape2=5)")
# Misspecifying the RNG string will return an error
#pred < predict(emax, E0 = "rbeta(shape1=1, shape2=5)")
### ERROR ###
#### Predict responses using metaanalysis of dose = 0 studies ####
# E0 is assigned a data frame of studies to synthesis
# Can be taken from placebo arms in triptans dataset
ref.df < network$data.ab[network$data.ab$agent==1,]
# Synthesis can be fixed/random effects
pred < predict(emax, E0 = ref.df, synth="random")
######################################################################
#### Specifying which doses/agents for which to predict responses ####
######################################################################
# Change the number of predictions for each agent
pred < predict(emax, E0 = 0.2, n.doses=20)
pred < predict(emax, E0 = 0.2, n.doses=3)
# Change the range of predicted doses to be the same for all agents
# But only predict responses for a subset of agents
pred < predict(emax, E0 = 0.2,
max.doses=list("Placebo"=0, "eletriptan"=5, "sumatriptan"=5))
plot(pred) # Plot predictions
# Specify several exact combinations of doses and agents to predict
pred < predict(emax, E0 = 0.2,
exact.doses=list("eletriptan"=c(0:5), "sumatriptan"=c(1,3,5)))
plot(pred) # Plot predictions
# Print and summarise `mbnma.predict` object
print(pred)
summary(pred)
# Plot `mbnma.predict` object
plot(pred)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.