calc_area
calculates the normalized surface area of the SOURCE + TDF
convex hull, only if there are exactly 2 biotracers.
calc_area(source, mix, discr)
output from load_source_data
output from load_mix_data
output from load_discr_data
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.)
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 areapl
function from splancs
package, which is not automatically installed as a dependency by MixSIAR
.
If splancs
is not installed, a WARNING message will appear.