Fit a Gaussian mixture distribution to weighted observations
Source:R/fit.R
fit_gaussian_mixture.RdFit a Gaussian mixture distribution to weighted observations
Value
A list with the fitted parameters mean, sd and p, each of which
is a vector with one entry for each component of the mixture
Examples
cod_data <- validate_ppmr_data(barnes_data, species = "Atlantic cod")
fit_gaussian_mixture(cod_data$log_ppmr, cod_data$n_prey)
#> $p
#> [1] 0.7647755 0.2352245
#>
#> $mean
#> [1] 4.619355 9.321923
#>
#> $sd
#> [1] 1.646948 1.736973
#>