dpmixsim (version 0.0-9)

postdpmixciz: Summary statistics and cluster estimation

Description

postdpmixciz computes post-simulation summary statistics, and estimates cluster partition.

Usage

postdpmixciz(x, res, kmax=30, rec=300, ngrid=200, plot=TRUE)

Arguments

x

data used in the simulation

kmax

maximum number of clusters

res

output of the MCMC simulation

rec

number of recorded iteration steps

ngrid

dimension of the grid used in density estimation

plot

logical variable to omit plots (default = TRUE

Value

z

cluster partition estimation

References

Adelino Ferreira da Silva, A Dirichlet process mixture model for brain MRI tissue classification, Medical Image Analysis 11 (2007) 169-182.

Adelino Ferreira da Silva, Bayesian mixture models of variable dimension for image segmentation, Comput. Methods Programs Biomed. 94 (2009) 1-14.

See Also

dpmixsim

Examples

Run this code
# NOT RUN {
## Example: MRI brain image segmentation
  slicedata <- readsliceimg(fbase="t1_pn3_rf0", swap=FALSE)
  image(slicedata$niislice, col=gray((0:255)/256), main="original image")
  x0 <- premask(slicedata, subsamp=TRUE)
  x  <- prescale(x0) 
  rec <- 3000
  res <- dpmixsim(x, M=1, a=1, b=2, upalpha=1, maxiter=4000,
      rec=rec, nclinit=8)
  ## post-simulation
  ngrid <- 200
  z <- postdpmixciz(x, res=res, rec=rec, ngrid=ngrid, plot=TRUE)
# }

Run the code above in your browser using DataLab