Description Usage Arguments Details Value Note
View source: R/component_samplers.R
Compue one draw of the autoregressive coefficients phi
in an AR(1) model.
The sampler also applies to a multivariate case with independent components.
1 | sampleARphi(yt, phi_j, sigma_tj, prior_phi = NULL)
|
yt |
the |
phi_j |
the |
sigma_tj |
the |
prior_phi |
the parameters of the prior for the AR(1) coefficients |
Sample the AR(1) coefficients phi_j
using the model
y_tj = mu_j + phi_j(y_{t-1,j} - mu_j) + e_tj
,
with e_tj ~ N(0, sigma[j]^2)
p x 1
vector of sampled AR(1) coefficient(s)
For the standard AR(1) case, p = 1
. However, the function applies more
generally for sampling p > 1
independent AR(1) processes (jointly).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.