bfa_ls {bifurcatingr} | R Documentation |
This function performs Least Squares estimation of bifurcating autoregressive (BFA) models of any order as described in Zhou and Basawa (2005).
bfa_ls(
z,
p,
x_data = FALSE,
y_data = FALSE,
resids = FALSE,
error_cor = TRUE,
error_var = FALSE,
cov_matrix = FALSE,
conf = FALSE,
conf_level = 0.95,
B = 49,
p_value = FALSE
)
z |
a numeric vector containing the tree data |
p |
an integer determining the order of bifurcating autoregressive model to be fit to the data |
x_data |
a logical that determines whether the x data used in fitting the model should be returned. Defaults to FALSE. |
y_data |
a logical that determines whether the y data used in fitting the model should be returned. Defaults to FALSE. |
resids |
a logical that determines whether the model residuals should be returned. Defaults to FALSE. |
error_cor |
a logical that determines whether the estimated correlation
between pairs of model errors |
error_var |
a logical that determines whether the estimated variance of the model errors should be returned. Defaults to FALSE. |
cov_matrix |
a logical that determines whether the estimated variance-covariance matrix of the least squares estimates should be returned. Defaults to FALSE. |
conf |
a logical that determines whether confidence intervals for model
coefficients should be returned. Defaults to FALSE. If TRUE, asymptotic normal
confidence intervals for the intercept and the slops are calculated using
|
conf_level |
confidence level to be used in computing the normal
confidence intervals for model coefficients when |
B |
number of bootstrap samples (replicates) |
p_value |
a logical that determines whether p-values for model
coefficients should be returned. Defaults to FALSE. If TRUE, p-values are
computed from normal distribution using estimated coefficients and
|
coef |
a matrix containing the least squares estimates of the autoregressive coefficients |
error_cor |
the least squares estimate of
the correlation between pairs of model errors |
x |
a matrix containing the x
data used in fitting the model. Only returned if |
y |
a vector containing the y data used in fitting the model. Only
returned if |
resids |
the model residuals. Only
returned if |
error_var |
the estimated variance of
the model errors. Only returned if |
cov_matrix |
the estimated variance-covariance matrix of the least
squares coefficients. Only returned if |
conf |
a
matrix of normal confidence intervals for model coefficients. Only returned
if |
p_value |
a matrix of two-sided p-values for
testing the significance of model coefficients. Computed from normal
distribution and using the estimated covariance matrix |
Zhou, J. & Basawa, I. V. (2005). Least squares estimation for bifurcating autoregressive processes. Statistics & Probability Letters, 74(1):77-88.
z <- bfa_tree_gen(127, 1, 1, 1, -0.9, -0.9, 0, 10, c(0.7))
bfa_ls(z, p=1)
bfa_ls(z,p=1,conf=TRUE,cov_matrix = TRUE,conf_level = 0.9,p_value=TRUE)