sl: Significance Level for Changepoint

Description Usage Arguments Details Value Note Examples

Description

Significance level of a postulate value for the changepoint's x- or (x,y)-coordinates.

Usage

1
2
3
4
## S4 method for signature 'Cpp_Clmbr'
sl( theta0,  method ="CLR", tolerance =0.001, output ="T" )
## S4 method for signature 'Cpp_Clmbr'
sl( theta0, alpha0,  method ="CLR", tolerance =0.001, output ="T" )

Arguments

theta0

postulate value for 'theta', the changepoint's x-coordinate.

alpha0

postulate value for 'alpha', the changepoint's y-coordinate.

method

"CLR", "MC" or "AF" which stand for conditional likelihood-ratio, conditional likelihood-ratio by Monte Carlo or approximate-F, details below.

tolerance

maximum absolute error in numerical integration for the "CLR" method or in Monte-Carlo evaluation for the "MC" method, not referenced for the "AF" method.

output

"T", "V" or "B" which stand for text, value or both.

Details

Knowles, Siegmund and Zhang (1991) reduced the conditional likelihood-ratio significance test to a probability expression based on a generic random variable.

The default method "CLR" evaluates this probability using a geometric-expectation formula that Knowles et al. also derived. This formula slightly over-estimates, but the error is negligible for significance levels below 0.20.

Method "MC" evaluates that probability expression directly by Monte Carlo simulation, which avoids the over-estimate of the "CLR" method.

Method "AF" estimates the distribution of the likelihood-ratio statistic by the related F-distribution (or chi-squared if variance is known) which would be exact for a linear model. This method is not exact, but it is common for non-linear regression.

Value

'sl' prints-out the result but does not return a value if 'output' is "T". 'sl' returns a numeric value if 'output' is "V" or "B".

Note

The 'tolerance' error-limit does not include the slight over-estimate that is inherent in the "CLR" method, nor the approximation inherent in the "AF" method.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#  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 $ sl( 6.1 )
sc $ sl( 6.1, 'mc' )
sc $ sl( 6.1, 'mc', 0.00001 )
sc $ sl( 6.1, 88.2, 'clr' )
sc $ sl( 6.1, 88.2, 'af' )
tmp <- sc $ sl( 6.1, 88.2, 'mc', 0.001, "B" )
tmp

Example output

Loading required package: Rcpp
 lm.br  version 2.9.3,  '?lm.br' starts help
  SL= 0.291069  for theta0 = 6.1  by method CLR  int.er.< 8.63628e-12

MC evaluation of conditional likelihood-ratio SL
for theta0= 6.1,  target accuracy =  0.001:

 iteration     est. SL      est. acc.
   1000000    0.290158     0.00090767

  SL= 0.290158  for theta0 = 6.1  by method CLR-MC

MC evaluation of conditional likelihood-ratio SL
for theta0= 6.1,  target accuracy =  1e-05:

 iteration     est. SL      est. acc.
   2000000     0.28954    0.000641415
   4000000    0.290008    0.000453766
   6000000    0.289915    0.000370463
   8000000    0.289843    0.000320807
  10000000    0.289997    0.000286984

  SL= 0.289997  for theta0 = 6.1  by method CLR-MC
  SL= 0.195294 for (th0,a0)= ( 6.1, 88.2 )  by method CLR  int.er.< 0.000422366
  SL= 0.189867 for (th0,a0)= ( 6.1, 88.2 )  by method AF

MC evaluation of conditional likelihood-ratio SL
for (th0,a0)= (6.1,88.2),  target accuracy =  0.001:

 iteration       est. SL      est. acc.
   1000000      0.194994    0.000315389

  SL= 0.194994 for (th0,a0)= ( 6.1, 88.2 )  by method CLR-MC
[1] 0.1949942

lm.br documentation built on May 2, 2019, 9:59 a.m.

Related to sl in lm.br...