# test the existence of change point in the bent line regression

### Description

This function use Wilcoxon score functions for calculating the test statistics and p-value by wild bootstrap.

### Usage

1 | ```
rbenttest(y, z, x, NB = 1000, myseed = 1)
``` |

### Arguments

`y` |
A vector of response |

`z` |
A vector of covariates |

`x` |
A numeric variable with change point |

`NB` |
resampling times |

`myseed` |
set seed |

### Value

A list with the elements

`Tn` |
The statistic based on original data. |

`Tn.NB` |
The statistics by wild bootstrap. |

`p.value` |
The p-value by wild bootstrap. |

### Author(s)

Feipeng Zhang

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 | ```
# for the example of MRS data
data(data_mrs)
x <- log(data_mrs$mass)
y <- log(data_mrs$speed)
z <- data_mrs$hopper
p.value <- rbenttest(y, cbind(1, z), x, NB = 50)$p.value
# for the example of bedload transport data
data(data_transport)
x <- data_transport$x
y <- data_transport$y
p.value <- rbenttest(y, 1, x, NB = 50)$p.value
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.