Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/bcpmeta.model.R

Implement a MCMC algorithm to quick search for the optimal changepoint configuration that has the largest posterior probability.

1 2 3 4 5 |

`X` |
a numerical vector. Observed time series. |

`meta` |
metadata. Either a vector of 0-1 indicators of the same length as |

`iter` |
total number of iterations of MCMC. |

`thin` |
thinning; save one iteration in every |

`trend` |
logical indicating whether to allow the linear trend component. |

`EB` |
logical indicating whether to use the empirical Bayes method
for |

`mu0` |
prior mean of regime-wise means |

`nu0` |
constant factor in prior variance of regim-wise means |

`a1` |
the first parameter in the Beta-Binomial prior of non-metadata times. |

`a2` |
the first parameter in the Beta-Binomial prior of metadata times. |

`b1` |
the second parameter in the Beta-Binomial prior of non-metadata times. |

`b2` |
the second parameter in the Beta-Binomial prior of metadata times. |

`phi.lower` |
lower bound of the range of |

`phi.upper` |
upper bound of the range of |

`start.eta` |
initial value of the changepoint configuration |

`track.time` |
logical indicating whether to show process time. |

`show.summary` |
logical indicating whether to show the top 5 configurations. |

`start.year` |
year index of the first time point in the series. |

`meta.year` |
logical indicating whether |

A Metropolis-Hastings algorithm with interwine of two
transitions, a component-wise updating and a simple random swapping.
See `references`

for details.

`Eta` |
a |

`map200` |
a |

`X` |
observed time series, same as the input value. |

`meta` |
metadata, same as the input value. |

`input.parameters` |
input parameters. Use command |

Yingbo Li

Maintainer: Yingbo Li <ybli@clemson.edu>

Li, Y. and Lund, R. (2014) Bayesian Mulitple Changepoint Detection Using Metadata. (submitted)

Function `marginal.plot`

uses the output of this function as input.

1 2 3 4 5 6 7 | ```
## Create a time series of length 200 with three mean shifts at 50, 100, 150.
data = simgen(2, 1);
X = data$X[1, ]; ## time series
meta = data$meta; ## locations of metadata times
## For illustration purpose, number of MCMC iteration is set to a small value.
results = bcpmeta.model(X, meta = meta, iter = 1e3, trend = FALSE);
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.