Skip to contents

Fit a normal distribution to weighted observations

Usage

fit_normal(value, weight)

Arguments

value

A numeric vector of observed values

weight

A numeric vector of weights

Value

A list with the fitted parameters mean and sd

Examples

cod_data <- validate_ppmr_data(barnes_data, species = "Atlantic cod")
fit_normal(cod_data$log_ppmr, cod_data$n_prey)
#> $mean
#> [1] 5.725514
#> 
#> $sd
#> [1] 2.600442
#>