View source: R/traceplot.bmeta.R
traceplot.bmeta | R Documentation |
Function to display a plot of iteration vs. sample values for each variable in the chain
traceplot.bmeta(x, node, title = "", lab = "")
x |
a |
node |
variable to be displayed on the traceplot |
title |
title of the plot if specified |
lab |
name of the variable to be displayed on the traceplot |
Tao Ding Gianluca Baio
### Read and format the data (binary)
data = read.csv(url("https://gianluca.statistica.it/software/bmeta/Data-bin.csv"))
### List data for binary outcome
data.list <- list(y0=data$y0,y1=data$y1,n0=data$n0,n1=data$n1)
### Select random-effects meta-analysis with t-distribution prior for binary
### data
x <- bmeta(data.list, outcome="bin", model="std.dt", type="ran")
### using output from bmeta to produce traceplot for a specific node
traceplot.bmeta(x,"mu")
### using output from bmeta to produce traceplot and specify the node used
traceplot.bmeta(x,"mu",lab="mu")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.