contour.angmcmc {BAMBI} | R Documentation |

## Contour plot for angmcmc objects with bivariate data

### Description

Contour plot for angmcmc objects with bivariate data

### Usage

```
## S3 method for class 'angmcmc'
contour(
x,
fn = "MAP",
type = "point-est",
show.data = TRUE,
xpoints = seq(0, 2 * pi, length.out = 100),
ypoints = seq(0, 2 * pi, length.out = 100),
levels,
nlevels = 20,
cex = 1,
col = "red",
alpha = 0.4,
pch = 19,
...
)
```

### Arguments

`x` |
angular MCMC object (with bivariate data). |

`fn` |
function, or a single character string specifying its name, to evaluate on MCMC samples to estimate
parameters. Defaults to |

`type` |
Passed to d_fitted. Possible choices are "point-est" and "post-pred". |

`show.data` |
logical. Should the data points be added to the contour plot? Ignored if |

`xpoints` |
Points on the first (x-) coordinate where the density is to be evaluated. Default to seq(0, 2*pi, length.out=100). |

`ypoints` |
Points on the first (x-) coordinate where the density is to be evaluated. Default to seq(0, 2*pi, length.out=100). |

`levels` |
numeric vector of levels at which to draw contour lines; passed to the contour function in graphics. |

`nlevels` |
number of contour levels desired |

`cex` , `col` , `pch` |
graphical parameters passed to |

`alpha` |
color transparency for the data points, implemented via |

`...` |
additional arguments to be passed to the function |

### Details

`contour.angmcmc`

is an S3 function for angmcmc objects that calls `contour`

from graphics.

To estimate the mixture density required to construct the contour plot, first the parameter vector `\eta`

is estimated
by applying `fn`

on the MCMC samples, yielding the (consistent) Bayes estimate `\hat{\eta}`

. Then the mixture density
`f(x|\eta)`

at any point `x`

is (consistently) estimated by `f(x|\hat{\eta})`

.

### Examples

```
# first fit a vmsin mixture model
# illustration only - more iterations needed for convergence
fit.vmsin.20 <- fit_vmsinmix(tim8, ncomp = 3, n.iter = 20,
n.chains = 1)
# now create a contour plot
contour(fit.vmsin.20)
```

*BAMBI*version 2.3.5 Index]