contrast.network.run: Run the model using the network object

Description Usage Arguments Value Examples

View source: R/contrast.network.R

Description

This is similar to the function network.run, except it uses contrast-level data instead of arms-level data.

Usage

1
2
3
contrast.network.run(network, inits = NULL, n.chains = 3,
  max.run = 1e+05, setsize = 10000, n.run = 50000,
  conv.limit = 1.05, extra.pars.save = NULL)

Arguments

network

contrast level network object created from contrast.network.data function

inits

Initial values for the parameters being sampled. If left unspecified, program will generate reasonable initial values.

n.chains

Number of chains to run

max.run

Maximum number of iterations that user is willing to run. If the algorithm is not converging, it will run up to max.run iterations before printing a message that it did not converge

setsize

Number of iterations that are run between convergence checks. If the algorithm converges fast, user wouldn't need a big setsize. The number that is printed between each convergence checks is the gelman-rubin diagnostics and we would want that to be below the conv.limit the user specifies.

n.run

Final number of iterations that the user wants to store. If after the algorithm converges, user wants less number of iterations, we thin the sequence. If the user wants more iterations, we run extra iterations to reach the specified number of runs

conv.limit

Convergence limit for Gelman and Rubin's convergence diagnostic. Point estimate is used to test convergence of parameters for study effect (eta), relative effect (d), and heterogeneity (log variance (logvar)).

extra.pars.save

Parameters that user wants to save besides the default parameters saved. See code using cat(network$code) to see which parameters can be saved.

Value

data_rjags

Data that is put into rjags function jags.model

inits

Initial values that are either specified by the user or generated as a default

pars.save

Parameters that are saved. Add more parameters in extra.pars.save if other variables are desired

burnin

Half of the converged sequence is thrown out as a burnin

n.thin

If the number of iterations user wants (n.run) is less than the number of converged sequence after burnin, we thin the sequence and store the thinning interval

samples

MCMC samples stored using jags. The returned samples have the form of mcmc.list and can be directly applied to coda functions

max.gelman

Maximum Gelman and Rubin's convergence diagnostic calculated for the final sample

deviance

Contains deviance statistics such as pD (effective number of parameters) and DIC (Deviance Information Criterion)

rank.tx

Rank probability calculated for each treatments. rank.preference parameter in network.data is used to define whether higher or lower value is preferred. The numbers are probabilities that a given treatment has been in certain rank in the sequence.

Examples

1
2
3
4
network <- with(parkinsons_contrast, {
 contrast.network.data(Outcomes, Treat, SE, na, V)
})
result <- contrast.network.run(network)

MikeJSeo/network-meta documentation built on Nov. 24, 2018, 1:01 p.m.