Hi all, in the function DPdensity( ) example -- ?DPdensity --, we can extract the density estimate by:

# Extracting the density estimate 
cbind(fit1.1$x1,fit1.1$dens) 
cbind(fit1.2$x1,fit1.2$dens) 

How is density calculated? I can imagine it is a mixture of normal densities, but where is the information about the density stored? Can we extract that so that we can write out the density function?

My second question is:

what is the last three columns of  -- fit1.1$save.state$randsave---? The plot of the last column of fit1.1$save.state$randsave doesn't look like the original data?

Thanks a lot.

David


      
	[[alternative HTML version deleted]]


