shar (version 1.1)

calculate_energy: calculate_energy

Description

Calculate mean energy

Usage

calculate_energy(pattern, weights = c(0.5, 0.5), return_mean = FALSE,
  comp_fast = 1000, verbose = TRUE)

Arguments

pattern

List with reconstructed patterns.

weights

Weights used to calculate energy. The first number refers to Gest(r), the second number to pcf(r).

return_mean

Return the mean energy.

comp_fast

If pattern contains more points than threshold, summary functions are estimated in a computational fast way.

verbose

Print progress report.

Value

numeric

Details

The function calculates the mean energy (or deviation) between the observed pattern and all reconstructed patterns (for more information see Tscheschel & Stoyan (2006) or Wiegand & Moloney (2014)). The pair correlation function and the nearest neighbour distance function are used to describe the patterns. For large patterns `comp_fast = TRUE` decreases the computational demand because no edge correction is used and the pair correlation function is estimated based on Ripley's K-function. For more information see estimate_pcf_fast.

References

Tscheschel, A., & Stoyan, D. (2006). Statistical reconstruction of random point patterns. Computational Statistics and Data Analysis, 51(2), 859-871.

Wiegand, T., & Moloney, K. A. (2014). Handbook of spatial point-pattern analysis in ecology. Boca Raton: Chapman and Hall/CRC Press.

See Also

plot_energy reconstruct_pattern_homo reconstruct_pattern_hetero reconstruct_pattern_cluster plot_randomized_pattern

Examples

Run this code
# NOT RUN {
pattern_random <- fit_point_process(species_a, n_random = 19)
calculate_energy(pattern_random)
calculate_energy(pattern_random, return_mean = TRUE)

# }
# NOT RUN {
marks_sub <- spatstat::subset.ppp(species_a, select = dbh)
marks_recon <- reconstruct_pattern_marks(pattern_random$randomized[[1]], marks_sub,
n_random = 19, max_runs = 1000)
calculate_energy(marks_recon, return_mean = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace