Description Usage Arguments Value Examples
For biviariate time series. It accomodates metadata (if any), and can handel monthly data and annual data.
1 2 3 4 5 6 7 8 | txtn(X, month = NULL, meta = NULL, iter = 10000, thin = max(1,
iter/1000), type = "monthly", p = 3, nu = 5, alpha1 = c(3/7, 2/7, 2/7,
19) * (type == "annual") + c(3/7, 2/7, 2/7, 239) * (type == "monthly"),
alpha2 = c(3/7, 2/7, 2/7, 3) * (type == "annual") + c(3/7, 2/7, 2/7, 47) *
(type == "monthly"), q = matrix(c(0, 1/2, 1/2, 1/2, 1/4, 0, 0, 1/4, 1/4, 0,
0, 1/4, 1/2, 1/2, 1/2, 0), ncol = 4, nrow = 4), start.eta = NULL,
track.time = TRUE, show.summary = 10, show.month = FALSE,
start.year = 1)
|
X |
A |
month |
A vector of length |
meta |
A 0-1 indicator vector of length |
iter |
Total number of MCMC iterations. |
thin |
Thinning; save one MCMC iteration for every |
type |
Whether data are observed 'annual' or 'monthly'. Default is 'monthly'. |
p |
The order of the VAR process. |
nu |
Prior variance scale of |
alpha1 |
The parameter in the Multinomial-Dirichlet prior of |
alpha2 |
The parameter in the Multinomial-Dirichlet prior of |
q |
A 4 by 4 transition matrix of the proposal distribution, only used in the flip proposal. |
start.eta |
A 0-1 indicator vector of length |
track.time |
Logical; whether to report processing time (in seconds). |
show.summary |
Integer; the number of top models to print. Default value is 10. |
show.month |
Logical; if show month in the summary. Default is
|
start.year |
Integer; the year time 1 is in. Default value is 1. |
mcmc |
A ( |
map200 |
A 200 by (2 * |
input.parameters |
A list of all the following input parameters:
|
1 2 3 4 5 6 | data(tuscaloosa);
X = as.matrix(tuscaloosa[, 3:4]);
## For illustration purpose, here iter is small.
## To get meaningfull inference, use a larger value, e.g., iter = 5e4.
results = txtn(X, month = tuscaloosa[, 2], meta = tuscaloosa[, 7], iter = 1e1);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.