calc_area {MixSIAR}R Documentation

Calculate the normalized surface area of the source convex hull

Description

calc_area() calculates the normalized surface area of the SOURCE + TDF convex hull, only if there are exactly 2 biotracers.

Usage

calc_area(source, mix, discr)

Arguments

source

output from load_source_data

mix

output from load_mix_data

discr

output from load_discr_data

Details

Important detail is that, unlike in Brett (2014), calc_area uses the combined SOURCE + TDF variance to normalize the surface area:

\sqrt{\sigma^2_source + \sigma^2_discr}

This is the variance used in fitting the mixing model.

calc_area() relies on the splancs::areapl() function from the splancs package. If splancs is not installed, a WARNING message will appear.

Value

If source$by_factor = FALSE, calc_area returns a scalar, the normalized surface area of the SOURCE + TDF convex hull

If source$by_factor = TRUE, calc_area returns a vector, where the entries are the normalized surface areas of the convex hull of each source factor level (e.g. source data by 3 Regions, returns a 3-vector of the areas of the Region 1 convex hull, Region 2 convex hull, etc.)

See Also

Brett (2014): https://www.researchgate.net/profile/Michael_Brett/publication/269873625_Resource_polygon_geometry_predicts_Bayesian_stable_isotope_mixing_model_bias/links/549884090cf2519f5a1de635.pdf


[Package MixSIAR version 3.1.12 Index]