Description Usage Arguments Value Author(s) See Also Examples
This function calculates the Kullback-Leibler estimators of the parameters of the components of the mixture intensity, based on a DAMCMC or BDMCMC fit. This is a decision theoretic estimator of the parameters, meaning that, we compute the Posterior Expected Loss (PEL) using the KL loss function and then find the parameter values that minimize the PEL.
For examples see
http://faculty.missouri.edu/~micheasa/sppmix/sppmix_all_examples.html#GetKLEst
1 2 |
fit |
Object of class |
burnin |
Number of initial realizations to discard. By default, it is 1/10 of the total number of iterations. |
fixLS |
Logical requesting to check and fix label switching (if present). Default is FALSE. |
approx |
Logical flag to request use of the identifiability constraint
to permute all realizations. Same parameter as in
function |
segment |
Number of segments to split the posterior realizations into. Each portion of posterior realizations is used to calculate a single Kullback-Leibler realization. The KL estimator is the average of all the KL realizations. Default is 50. |
An object of class intensity_surface
.
Jiaxun Chen, Sakis Micheas
rmixsurf
,
rsppmix
,
est_mix_damcmc
,
GetPMEst
,
GetMAPEst
,
CompareSurfs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #generate a surface
truemix_surf <- rmixsurf(m = 3, lambda=100, xlim = c(-3,3), ylim = c(-3,3))
plot(truemix_surf,main="True IPPP intensity surface")
#generate a point pattern
genPPP=rsppmix(intsurf = truemix_surf, truncate = FALSE)
#fit the IPPP model using DAMCMC
fit = est_mix_damcmc(genPPP, m = 3,L=20000)
#get the surfaces of posterior means, MAP and KL estimates
Meansest=GetPMEst(fit)
MAPest=GetMAPEst(fit)
KLest=GetKLEst(fit)
#plot all fitted surfaces
plot(Meansest,main="IPPP intensity surface of posterior means")
plot(MAPest,main="IPPP intensity surface of MAP estimates")
plot(KLest,main="IPPP intensity surface of KL estimates")
#fix labels (if label switching is detected)
KLestLSFixed=GetKLEst(fit,fixLS=TRUE,approx=FALSE)
plot(KLestLSFixed,main="IPPP intensity surface of KL estimates (LS fixed)")
#compare the four estimates against the truth
CompareSurfs(truemix_surf, Meansest, LL = 100, truncate = FALSE)
CompareSurfs(truemix_surf, MAPest, LL = 100, truncate = FALSE)
CompareSurfs(truemix_surf, KLest, LL = 100, truncate = FALSE)
CompareSurfs(truemix_surf, KLestLSFixed, LL = 100, truncate = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.