est_MIPPP_cond_mark: Fit a MIPPP conditionally on mark

Description Usage Arguments Value Author(s) See Also Examples

Description

This function fits a Marked IPPP (MIPPP) on a marked point pattern by modeling the (joint) intensity surface of the locations and the marks using an IPPP for the marks (independent of the locations) and an IPPP with mixture intensity for the corresponding ground process, where the mixture parameters depend on the mark value. NOTE: The estimation procedure for continuous marks will be implemented in future versions of the sppmix package.

For examples see

http://faculty.missouri.edu/~micheasa/sppmix/sppmix_all_examples.html#est_MIPPP_cond_mark

Usage

1
2
3
4
est_MIPPP_cond_mark(pp, m = 10, L = 50000, burnin = floor(L/10), hyper_da,
  hyper, fit_markdist = TRUE, truncate = FALSE, grayscale = FALSE,
  discrete_mark = TRUE, LL = 256, open_new_window = FALSE,
  show_plots = TRUE, compute_surfaces = TRUE)

Arguments

pp

Marked point pattern of class ppp.

m

A vector representing the number of components to fit for the ground process corresponding to each mark. Since in real applications we don't know these numbers we can specify an integer so that the routine will fit a BDMCMC with this m as the maximum number of components. Then we use the MAP number of components for each ground process with a mixture intensity function of this many components. If not supplied the default is m=10.

L

Number of iterations for the MCMC; default is 50000.

burnin

Number of initial realizations to discard. By default, it is 1/10 of the total number of iterations.

hyper_da

A list of hyperparameters for est_mix_damcmc. Each element of this list should contain 3 values (hyperparameters) and the number of elements should be the same as the number of marks. If this parameter is omitted the default hyperparameters of est_mix_damcmc will be used.

hyper

Hyperparameter for the mark distribution. Must be a vector of positive real numbers. If omitted the vector of one's is used.

fit_markdist

Logical variable requesting to fit and return the parameter estimates of the mark distribution.

truncate

Logical variable indicating whether or not we we only work with events within the window defined in the point pattern pp.

grayscale

Logical to request plots in grayscale.

discrete_mark

Logical flag indicating whether the mark is discrete or not. For continuous marks set this to FALSE.

LL

Length of the side of the square grid.

open_new_window

Open a new window for a plot.

show_plots

Logical variable requesting to produce the ground fits and probability field plots for each mark. If label switching is present, the MAPE surface is computed and returned, otherwise the PME.

compute_surfaces

Logical to request computation of the Average of Surfaces (if m is a vector) or the Bayesian Model Average (if m is an integer or missing). Default is TRUE. This is a SLOW operation.

Value

An object of class MIPPP_fit, which is simply a list containing the following components:

gen_mark_ps

The posterior realizations of the discrete mark distribution probabilities.

mark_dist

The posterior means of the discrete mark distribution probabilities.

discrete_mark

Same logical flag as the input argument.

pp

Same as the input argument.

ground_fits

A List of objects of type damcmc_res which contain the results of the DAMCMC (or the BDMCMC for MAP number of components) fits to the ground process for each discrete mark value.

ground_fitsAoS

A List of objects of type im which contain the AoS (average of surfaces) surface based on the DAMCMC (or the BMA from BDMCMC) fits to the ground process for each discrete mark value.

post_surf

A List of intensity_surface objects, one for each mark, representing the surface of posterior means, after fixing label switching using SEL permutation.

condition_on_loc

Logical variable indicating the type of conditioning used in order to produce this MIPPP fit. For this function it is set to FALSE.

fit_DAMCMC

Logical variable indicating whether or not a DAMCMC or BDMCMC fit was requested.

m

Same as input.

Author(s)

Sakis Micheas, Jiaxun Chen

See Also

rMIPPP_cond_mark, GetStats

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#Create a marked point pattern; use randomization and 3 discrete marks
newMPP=rMIPPP_cond_mark( params=c(.2,.5,.3),bigwin = spatstat::owin(c(-10,10),c(-10,10)))
newMPP$params
#supply the true number of components for each ground process
m=c(newMPP$groundsurfs[[1]]$m, newMPP$groundsurfs[[2]]$m, newMPP$groundsurfs[[3]]$m)
MIPPPfit=est_MIPPP_cond_mark(newMPP$genMPP,m=m,compute_surfaces=FALSE)
#check out the mark distribution parameters
#posterior means
MIPPPfit$mark_dist
#credible sets
GetStats(MIPPPfit$gen_mark_ps[,1])$CredibleSet#should contain .2
GetStats(MIPPPfit$gen_mark_ps[,2])$CredibleSet#should contain .5
GetStats(MIPPPfit$gen_mark_ps[,3])$CredibleSet#should contain .3
#now pretend we do not know the truth as is usually the case. Supply an integer
#for m so that the routine will fit a BDMCMC with this as the max number of
#components and use the MAP number of components
MIPPPfit=est_MIPPP_cond_mark(newMPP$genMPP,m=7,compute_surfaces=FALSE)
#check out the mark distribution parameters
MIPPPfit$mark_dist
GetStats(MIPPPfit$gen_mark_ps[,1])$CredibleSet#should contain .2
GetStats(MIPPPfit$gen_mark_ps[,2])$CredibleSet#should contain .5
GetStats(MIPPPfit$gen_mark_ps[,3])$CredibleSet#should contain .3

sppmix documentation built on Jan. 13, 2021, 10:04 p.m.