ci: Confidence Interval for the Changepoint

Description Usage Arguments Details Examples

View source: R/ci.R

Description

Confidence interval for 'theta', the changepoint's x-coordinate.

Usage

1
2
## S4 method for signature 'Cpp_Clmbr'
ci(  CL =0.95, method ="CLR" )

Arguments

CL

confidence level, between 0 and 1.

method

"CLR" or "AF" which stand for conditional likelihood-ratio or approximate-F, see sl for details.

Details

This subroutine scans to determine the postulate values of 'theta' that have significance level greater than 1-CL.

Examples

1
2
3
4
5
6
7
#  Data for Patient B from Smith and Cook (1980)
y <- c(37.3, 47.1, 51.5, 67.6, 75.9, 73.3, 69.4, 61.5, 31.8, 19.4)
x <- 1:10
sc <- lm.br( y ~ x )
sc$ci()
sc $ ci( 0.90 )
sc $ ci( .99, 'af' )

Example output

Loading required package: Rcpp
 lm.br  version 2.9.3,  '?lm.br' starts help
95-percent confidence interval for changepoint 'theta' by CLR
    [ 5.17344, 7.50078 ]
90-percent confidence interval for changepoint 'theta' by CLR
    [ 5.32969, 6.94922 ]
99-percent confidence interval for changepoint 'theta' by AF
    [ 4.63281, 7.80868 ]

lm.br documentation built on May 30, 2017, 1:22 a.m.

Related to ci in lm.br...