cable.change.conf {bentcableAR}R Documentation

Confidence Interval for CTP of AR(p) Bent Cable


The critical time point (CTP) is estimated and accompanied by a Wald confidence interval.


cable.change.conf(, level)


A object for AR(p0) data.


A numeric value between 0 and 1, exclusive.


The CTP is the unique time point at which the cable's slope changes sign. If this exists, then it must happen inside the transition τ\pmγ, and is estimated by this function based on the bent-cable regression supplied as Additionally, an approximate confidence interval using the Wald method is obtained by estimating the asymptotic variance of the CTP estimator. Variance estimation involves inverting an approximate Fisher information matrix by calling the built-in R function solve.

cable.change.conf returns an error if the CTP (almost) does not exist, e.g. when the estimated bent cable slope (almost) does not change signs, or when the fit from is obtained with a time vector that is not c(0,1,2,...). See Warnings below.



The estimated CTP.


The estimated asymptotic variance of the CTP estimator.


The 100*level percent Wald confidence interval for the CTP.


Computations for the CTP estimate and confidence interval are based on a time vector of the form c(0,1,2,...). For any other form for the time vector, the CTP will not be computed, and on-screen warnings will appear. To ensure compatibility between the model fit and CTP estimates, the user is advised to fit the model using the default time vector. Then, if necessary, the user may transform the results to the preferred time scale after the model and CTP estimates have been produced.

The above computational issue implies that the function cannot handle non-time-series data. Rationale: In a non-time-series context design points are often non-equidistant, and the cable's slope often never changes sign; even with a sign change, the point at which this takes place may be less interpretable. In such a context, the user is advised to rely on confidence regions for (τ,γ) (see References).


This function is intended for internal use by


Grace Chiu


See the bentcableAR package references.

See Also




# AR(2) cable fit
fit.ar2 <- c(13,.1,-.5,11,4,.5,-.5),
	sockeye$logReturns, tol=1e-4 )
cable.change.conf( fit.ar2, .9 )

	# compare to this:
	# fit.ar2 <- sockeye$logReturns, 
	#	init.cable=c(13,.1,-.5,11,4), p=2, ci.level=.9 )
	# cable.change.conf( fit.ar2$cable, .9 )

# AR(2) stick fit
stick.ar2 <- c(13,.1,-.5,11,.5,-.5),
	sockeye$logReturns, tol=1e-4, stick=TRUE)
cable.change.conf( stick.ar2, .9)
	# compare to this:
	# stick.ar2 <- sockeye$logReturns,
	#	init.cable=c(13,.1,-.5,11), p=2, stick=TRUE, ci.level=.9 )
	#	cable.change.conf( stick.ar2$cable, .9 )

# AR(4) stick fit
fit.ar4 <- c(13,.1,-.5,11,.5,-.5,.5,-.5),
	sockeye$logReturns, tol=1e-4, stick=TRUE )
cable.change.conf( fit.ar4, .9 )

	# compare to this:
	# fit.ar4 <- sockeye$logReturns,
	#	init.cable=c(13,.1,-.5,11), p=4, stick=TRUE, ci.level=.9 )
	# cable.change.conf( fit.ar4$cable, .9 )

[Package bentcableAR version 0.3.0 Index]