calculate_pop {sgsR}R Documentation

Population descriptors

Description

Population matrices and descriptions of metric raster data

Calculates population level statistics including principal components, quantile matrix, and covariance matrix needed necessary for calculate_lhsOpt. Outputs can also be used as an input for sample_ahels.

Usage

calculate_pop(mraster, PCA = FALSE, matQ = TRUE, nQuant = 10, matCov = TRUE)

Arguments

mraster

spatRaster. ALS metrics raster.

PCA

Logical. Calculates principal component loadings of the population for PCA similarity factor testing. default = FALSE.

matQ

Logical. Calculates quantile matrix of the population for quantile comparison testing. default = TRUE.

nQuant

Numeric. Number of quantiles to divide the population into for matQ. default = 10.

matCov

Logical. Calculates covariate matrix of the population. Needed for Kullback–Leibler divergence testing. default = TRUE. Requires matQ = TRUE.

Value

List of matrices to be used as input for calculate_lhsOpt.

Note

Special thanks to Dr. Brendan Malone for the original implementation of this algorithm.

Author(s)

Tristan R.H. Goodbody

References

Malone BP, Minasny B, Brungard C. 2019. Some methods to improve the utility of conditioned Latin hypercube sampling. PeerJ 7:e6451 DOI 10.7717/peerj.6451

See Also

Other calculate functions: calculate_allocation(), calculate_allocation_existing(), calculate_coobs(), calculate_distance(), calculate_pcomp(), calculate_representation(), calculate_sampsize()

Examples

#--- Load raster and access files ---#
r <- system.file("extdata", "mraster.tif", package = "sgsR")
mr <- terra::rast(r)

calculate_pop(mraster = mr)


[Package sgsR version 1.4.5 Index]