frequentist_unconstrained: Source apportionment via unconstrained least-squares with...

View source: R/frequentist_unconstrained.R

frequentist_unconstrainedR Documentation

Source apportionment via unconstrained least-squares with classical variability propagation

Description

Estimates the fractional contribution of each sediment source to a mixture by solving an overdetermined mass-balance system with least-squares minimisation. Source variability is propagated by Monte Carlo resampling: at each iteration, synthetic source signatures are drawn from a normal distribution defined by the measured mean and standard deviation, and the system is solved independently for each draw.

Usage

frequentist_unconstrained(
  data,
  variability = "SEM",
  iter = 1000,
  means = FALSE,
  seed = 123456L,
  verbose = TRUE
)

Arguments

data

Data frame in the standard OceanTracer format (sources + mixture).

variability

Character. "SEM" for Standard Error of the Mean, "SD" for Standard Deviation.

iter

Integer or character. Number of Monte Carlo iterations (e.g., 1000, or character keywords like "short", "medium", "long"). Default is 1000.

means

Logical. TRUE when the input is in averaged format (Mean_/SD_ columns); FALSE for raw observations.

seed

Integer. Random seed for reproducibility. Default is 123456L.

verbose

Logical. Whether to show progress bars and summary messages in the console. Default is TRUE.

Details

This function is the computational back-end called by unmixing. For most users, calling unmixing directly is recommended.

Value

A data frame with one row per iteration containing the mixture ID, goodness-of-fit (GOF), and one column per source with the estimated fractional contribution.


OceanTracer documentation built on Oct. 15, 2026, 5:09 p.m.