Description Usage Arguments Details Value Note Author(s) References See Also Examples

This function uses MM algorithm to fit a piece-wise constant curve to a sequence of signals ordered linearly.

1 |

`y` |
A vector of original signal. |

`sigma` |
A numeric number indicating the standard deviation of |

`rho1,rho2` |
Factors to be set in the tuning parameters of lambda1 and lambda2. See details. |

`obj_c` |
Stopping criterion based on the size of improvement of objective function. |

`max_iter` |
Maximum iteration of MM algorithm to be used to solve the GFL model. |

In order to fit a piece-wise constant curve to signal intensities ordered linearly, we try to minimize the following objective function

*
loss function + lambda1 * lasso penalty + lambda2 * fused lasso penalty
*

The optimal solution is approached via an iteration based algorithm called Majorization-Minimization (MM) algorithm developed by Kenneth Lange (2004).The choices of tuning parameters of the model are suggested as follows:

*λ_1 = ρ_1 σ*

*λ_2 = ρ_2 σ √{\log N}*

where *σ* is an estimate of standard deviation of signals, *N* is the number of markers and *ρ_1* and *ρ_2* are properly chosen contant factors. More details are referred to Zhang et al. (2010).

All outputs are collected in a list:

`obj` |
A vector of values of objective function at each MM iteration. |

`beta` |
A vector of the same dimension as |

If the user just wants to segment one sequence of signals, then `GL`

is a little more efficient than `GFL`

, which is designed for segmentation of multiple sequences.

Zhongyang (Thomas) Zhang, zhangzy@ucla.edu

Kenneth Lange. (2004)

*Optimization*. Springer, New York.Zhongyang Zhang, Kenneth Lange, Roel Ophoff, and Chiara Sabatti. (2010) Reconstructing DNA copy number by penalized estimation and imputation.

*The Annals of Applied Statistics*, 4(4): 1749-1773.

See `GFL`

for joint segmentation of multiple sequences of signals.

1 2 3 4 5 6 7 8 | ```
## Segment 1 sequence of signals with 100 markers
## Duplications are superimposed in the middle
y <- rnorm(100,0,0.15)
y[41:60] <- rnorm(20,0.3,0.2)
tmp <- y[-1] - y[-length(y)]
sigma <- sd(tmp)/sqrt(2)
res <- FL(y=y, sigma=sigma, rho1 = 1, rho2 = 2, obj_c = 1e-04, max_iter = 1000)
plot(res$beta,type="s")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.