Learn R Programming

bda (version 19.0.0)

blinding: Changing Point Estimation for Blinding Data

Description

To find the changing point.

Usage

blinding(x, y)

Value

the changing point at 'x'.

Arguments

x,y

paired vectors - sorted by 'x'.

Details

using the likelihood ratio test with two linear fits

Examples

Run this code
 x <- sort(rnorm(20,6,2))
 y1 <- 1 + 1.5 * x[1:10] + rnorm(10)
 y2 <- 10 + 0.5 * x[11:20] + rnorm(10)
 y <- c(y1,y2)
 plot(y~x)
 abline(a=10,b=0.5, col='red',lty=2)
 abline(a=1,b=1.5, col='blue',lty=2)
 blinding(x,y)

Run the code above in your browser using DataLab