buildAR | R Documentation |
Description text
buildAR(
vec,
x = NULL,
wsize,
method = c("equal", "unweighted", "triangle"),
seed = NULL,
rhat_method = c("none", "geometric", "arithmetic"),
lambda = 0
)
vec |
A vector of numeric data |
x |
A vector containing a covariate with which to generate AR model, if unspecified, defaults to vec |
wsize |
Number of prior observations to use for averaging |
method |
Type of weighting to use |
seed |
Seed for random number generator |
rhat_method |
Method for calculating rhat, if "none", rhat = 1 and has no effect |
lambda |
Shrinkage parameter, if not specified, default is 0 which produces no shrinkage. If an array is specified, all values in teh array are evaluated and the optimal lambda is chosen based on residual sum of squares. Values should be between 0 and 1 inclusive. |
A list with the following components:
wsize is the number of prior observations used for averaging
vec is a numeric vector containing the input data
fit is a numeric vector containing the autoregressive model fitted data
errors is a numeric vector containing the difference between fit and vec
initphi is a numeric vector containing the initial phi
finalphi is a numeric vector containing the final phi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.