coefs.start {BTSR} | R Documentation |
Initial values for optimization
Description
This function calculates initial values for the parameter vector, to pass to the optimization function.
Usage
coefs.start(model = "Generic", yt, linkg = c("linear", "linear"),
xreg = NULL, p = 0, q = 0, d = TRUE, y.start = NULL,
y.lower = -Inf, y.upper = Inf, lags = list(), fixed.values = list(),
fixed.lags = list())
Arguments
model |
character; The model to be fitted to the data. One of
|
yt |
a univariate time series. Missing values (NA's) are not allowed. |
linkg |
character; one of |
xreg |
optional; a vector or matrix of external regressors, which must have the same number of rows as x. |
p |
an integer; the AR order. Default is zero. |
q |
an integer; for |
d |
logical; if FALSE, |
y.start |
optional; an initialization value for |
y.lower |
lower limit for the distribution support.
Default is |
y.upper |
upper limit for the distribution support.
Default is |
lags |
optional; a list with the components |
fixed.values |
optional; a list with the fixed values for
each component, if any. If fixed values are provided, either |
fixed.lags |
optional; a list with the components |
Value
a list with starting values for the parameters of the selected model. Possible outputs are:
alpha |
the intercept |
beta |
the coefficients for the regressors |
phi |
the AR coefficients |
theta |
for BARC models, the map parameter. For any other model, the MA coefficients |
d |
the long memory parameter |
nu |
the precison parameter |
Examples
mu = 0.5
nu = 20
yt = rbeta(100, shape1 = mu*nu, shape2 = (1-mu)*nu)
coefs.start(model = "BARFIMA", yt = yt,
linkg = "linear", d = FALSE,
y.lower = 0, y.upper = 1)
yt = rgamma(100, shape = nu, rate = mu*nu)
coefs.start(model = "GARFIMA", yt = yt,
linkg = "linear", d = FALSE,
y.lower = 0, y.upper = Inf)