cr {lm.br} | R Documentation |
Confidence Region for the Changepoint
Description
Joint confidence region for ( theta, alpha ), the changepoint's (x,y)-coordinates.
Usage
## S4 method for signature 'Cpp_Clmbr'
cr( CL =0.95 , method ="CLR", incr, output ="G" )
Arguments
CL |
confidence level, between 0 and 1. |
method |
"CLR" or "AF" which stand for conditional likelihood-ratio or approximate-F (rapid), see |
incr |
increment of theta values for the confidence region's boundary-points. |
output |
"G", "T" or "V" which stand for graph, text or value. |
Details
This subroutine scans to determine the postulate values of (theta, alpha) that have significance level greater than 1-CL. It scans first along the (theta, alpha-MLE) ridge to determine the 'theta' boundary limits.
Value
If 'output' is "G" or "T" then 'cr' graphs or prints-out the confidence region but does not return a value. If 'output' is "V" then 'cr' returns an N x 3 matrix of boundary points ( theta, min-alpha, max-alpha ).
Examples
# A quick example
y <- c( 2, 0, 2.001, 4, 6 )
x <- 1:5
t <- lm.br( y ~ x )
t $ cr()
t$cr( .9, 'af', incr = 0.1, out='t' )