Calculate Robust Gaussian Estimates
fit_gauss.Rd
Estimates parameters of the Gaussian distribution
(\(\mu\), \(\sigma\)) via non-linear least-squares,
making Gaussian assumptions of the error function, see pnorm()
.
Initial starting values are chosen via robust estimates,
median()
and mad()
. If mad = TRUE
, these starting
values are returned.
Examples
x <- rnorm(100, 25, 3)
fit_gauss(x)
#> mu sigma
#> 24.368735 3.006532
fit_gauss(x, mad = TRUE)
#> mu sigma
#> 24.485358 3.072565