DPEM {segclust} | R Documentation |
Estimation of segmentation/clustering parameters in the Gaussian case, using dynamic programming and the EM algorithm. This function performs a global analysis with estimation and model selection. It uses functions hybrid(), segclustselect(), and seclustout(). Pmin and Pmax must be different.
output <- DPEM(x,Pmin,Pmax,Kmax,method,draw,lmin=1,lmax=length(x),vh=TRUE,S=0.5)
x |
data vector (without missing values) |
Pmin |
minimum number of clusters |
Pmax |
maximum number of clusters |
Kmax |
max number of segments. Kmax must be greater than Pmax |
method |
model selection method. Equals "sequential" or "BIC" |
draw |
equals TRUE for a graphical display |
lmin |
minimum segment length, default value lmin = 1 |
lmax |
maximum segment length, default value lmax = length(x) |
vh |
TRUE for homogeneous variances (default), FALSE otherwise |
S |
Threshold for model selection, set at 0.5 |
output |
dataframe containing results of the estimation procedure |
output$signal |
input signal x |
output$mean |
estimated mean according to the model, for each position |
output$sd |
estimated standard deviation according to the model, for each position |
output$cluster |
cluster for each point |
output$bp |
breakpoint coordinates, equals 1 for a breakpoint (corresponding to the end of the segments) |
F. Picard, M. Hoebecke
Picard, F., Robin, S., Lebarbier, E., & Daudin, J. -J. (2007). A segmentation/clustering model for the analysis of array CGH data. Biometrics, 63(3) 758-766
x1 <- rnorm(20,0,1) x2 <- rnorm(30,2,1) x3 <- rnorm(10,0,1) x4 <- rnorm(40,2,1) x <- c(x1,x2,x3,x4) Pmin <- 1 Pmax <- 4 Kmax <- 20 output <- DPEM(x,Pmin,Pmax,Kmax,method="BIC",draw=TRUE)