samplesAutoC {BRugs} | R Documentation |

## Plot autocorrelation function

### Description

This function calculates and plots the autocorrelation function of a variable.

### Usage

```
samplesAutoC(node, chain, beg = samplesGetBeg(),
end = samplesGetEnd(), thin = samplesGetThin(), plot = TRUE,
mfrow = c(3, 2), ask = NULL, ann = TRUE, ...)
```

### Arguments

`node` |
Character vector of length 1, name of a variable in the model. |

`chain` |
Selects a chain to plot autocorrelation function for. |

`beg` , `end` |
Arguments to select a slice of monitored values corresponding to iterations |

`thin` |
To only use every |

`plot` |
Logical, whether to plot the ACF or only return the values. If |

`mfrow` , `ask` , `ann` |
Graphical parameters, see |

`...` |
Further graphical parameters as in |

### Details

If the variable of interest is an array, slices of the array can be selected using the notation
`variable[lower0:upper0, lower1:upper1, ...]`

.
A star ‘`*`

’ can be entered as shorthand for all the stored samples.

If the arguments are left at their defaults the whole sample for all chains will be used for calculation.

### Value

A list containing `acf`

objects - one for each scalar variable contained in
argument `node`

. See `acf`

for details on the list elements.

### Note

If the MCMC simulation has an adaptive phase it will not be possible to make inference using values sampled before the end of this phase.

### See Also

`plotAutoC`

, `acf`

, `BRugs`

, `help.WinBUGS`

*BRugs*version 0.9-2.1 Index]