find_valley {InPAS} | R Documentation

## find the local minimal mean squared error (MSE)

### Description

for a giving numeric vectors, calculate the top N local minimal mean squared error. The sites of local minimal MSE are saved if they are in the range of searching start site to searching end site

### Usage

    find_valley(x, ss, se, n = 1, savedID = NA, filterByPval = TRUE)

### Arguments

`x` | a numeric(n) vector containing MSEs for a given range.
`ss` | position to start searching positions of local minimal MSE
`se` | position to end searching positions of local minimal MSE
`n` | the length of output. If n=-1, output all the local minimal MSE positions.
`savedID` | saved positions of local minimal MSE
`filterByPval` | A logical(1) vector, indicating whether tp filter the candidate positions by significant levels (p values) or not.

### Value

a numeric vector containing a number of candidate CP sites.

### Author(s)

Jianhong Ou

[Package InPAS version 2.2.0 Index]