bfa.ls {bifurcatingr}R Documentation

Least Squares Estimation of Bifurcating Autoregressive Models

Description

This function performs Least Squares estimation of bifurcating autoregressive (BFA) models of any order as described in Zhou & Basawa (2005).

Usage

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,
  p.value = FALSE
)

Arguments

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 (e_{2t}, e_{2t+1}) should be returned. Defaults to TRUE.

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, normal confidence intervals are calculated using cov.matrix.

conf.level

confidence level to be used in computing the normal confidence intervals for model coefficients when conf=TRUE. Defaults to 0.95.

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 cov.matrix.

Value

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 (e_{2t}, e_{2t+1}). Only returned if error.cor=TRUE

x

a matrix containing the x data used in fitting the model. Only returned if x.data=TRUE

y

a vector containing the y data used in fitting the model. Only returned if y.data=TRUE

resids

the model residuals. Only returned if resids=TRUE

error.var

the estimated variance of the model errors. Only returned if error.var=TRUE

cov.matrix

the estimated variance-covariance matrix of the least squares coefficients. Only returned if cov.matrix=TRUE

conf

a matrix of normal confidence intervals for model coefficients. Only returned if conf=TRUE

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 cov.matrix. Only returned if p.value=TRUE

References

Zhou, J. & Basawa, I. V. (2005). Least squares estimation for bifurcating autoregressive processes. Statistics & Probability Letters, 74(1):77-88.

Examples

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)

[Package bifurcatingr version 1.0.0 Index]