acf.plot: Autocorrelation function plot

Description Usage Arguments Value Author(s) Examples

Description

Function to create autocorrelation function plot to assess convergence

Usage

1
acf.plot(x,node,title="Autocorrelation function")

Arguments

x

a bmeta object with results of the model

node

variable to be displayed on the plot

title

title of the plot, if specified

Value

A plot showing the autocorrelation for the selected node

Author(s)

Tao Ding Gianluca Baio

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
### Read and format the data (binary)
data = read.csv(url("http://www.statistica.it/gianluca/bmeta/Data-bin.csv"))

### List data for binary outcome 
data.list <- list(y0=data$y0,y1=data$y1,n0=data$n0,n1=data$n1) 

### generate output from bmeta 
x <- bmeta(data=data.list,outcome="bin",model="std.dt",type="ran")

### generate autocorrelation function plot 
acf.plot(x,"alpha[1]")

### generate autocorrelation function plot and specify the title 
acf.plot(x,"alpha[1]",title="Autocorrelation plot")

bmeta documentation built on May 2, 2019, 12:48 a.m.