stick.ar.0 | R Documentation |
This function is the main engine for bentcable.ar
when a
broken stick (i.e. γ=0 for bent cable) model is assumed
for independent data. For AR(p) time-series data, this function is
intended for determining an appropriate p and initial values for
the stick parameters.
stick.ar.0(init.vect, y.vect, t.vect = NULL, n = NA)
init.vect |
A numeric vector of initial values, in the form
of |
y.vect |
A numeric vector of response data. |
t.vect |
A numeric vector of design points, which need not be
equidistant. Specifying |
n |
Length of response vector (optional). |
The returned object is compatible with a cable.ar.p.iter
object for independent data.
The broken stick as a special case of the bent cable has form f(t) = b_0 + b_1 t + b_2 (t-τ) I\{t>τ\} .
Broken-stick regression by maximum likelihood for independent data
is performed via nonlinear least-squares estimation of
θ=(b_0,b_1,b_2,τ) through the built-in R function
nls
. The estimation relies on the user-supplied initial
values in init
.
fit |
An |
y, t, n |
As supplied by the user. |
p, stick |
The values |
This function is intended for internal use by bentcable.ar
.
Grace Chiu
See the bentcableAR
package references.
cable.ar.p.iter
, fullcable.t
,
cable.fit.known.change
.
data(sockeye) stick.ar.0( c(13,.1,-.7,12), sockeye$logReturns )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.