plot.damcmc_res: Plot results from a DAMCMC fit

Description Usage Arguments Author(s) See Also Examples

View source: R/mcmc_plots.R

Description

This function uses the posterior realizations from a est_mix_damcmc call, to produce a plethora of plots about the fitted Poisson point process with mixture intensity surface.

For examples see

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

Usage

1
2
## S3 method for class 'damcmc_res'
plot(x, burnin = floor(length(fit$allgens)/10), ...)

Arguments

x

Object of class damcmc_res.

burnin

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

...

Additional arguments for the S3 method.

Author(s)

Jiaxun Chen, Sakis Micheas, Yuchen Wang

See Also

est_mix_damcmc, PlotUSAStates, GetPMEst, check_labels, FixLS_da, plot_chains

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
fit <- est_mix_damcmc(pp = spatstat::redwood, m = 10)
plot(fit)
#Tornadoes
Tornfit=est_mix_damcmc(Tornadoes2011MO, m=5, L = 20000)
MAPsurf=GetMAPEst(Tornfit)
ret=PlotUSAStates(states=c('Iowa','Arkansas', 'Missouri','Illinois','Indiana',
 'Kentucky','Tennessee', 'Kansas','Nebraska','Texas','Oklahoma','Mississippi',
 'Alabama','Louisiana'),showcentroids=FALSE, shownames=TRUE, plotlevels = FALSE,
 main="Tornadoes about MO, 2011", pp=Tornadoes2011MO, surf=MAPsurf,
 boundarycolor="white", namescolor="white")
print(ret)
plot(Tornfit)
# get the intensity of posterior means
post_mean = GetPMEst(Tornfit)
# plot the estimated intensity surface
plot(post_mean)
#check labels
check_labels(Tornfit)
# If present then fix label switching, start with approx=TRUE
post_fixed = FixLS_da(Tornfit, plot_result = TRUE)
plot_chains(post_fixed)
plot_chains(post_fixed,separate = FALSE)

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