cgarling / StarFormationHistories.jl

Fitting astrophysical star formation histories via CMD modelling.
MIT License
3 stars 0 forks source link

\sigma uncertainties in `fit_templates` #16

Closed cgarling closed 4 months ago

cgarling commented 1 year ago

Should they be exp.(sqrt.(diag(Optim.trace(result.mle.result)[end].metadata["~inv(H)"])) .* Optim.minimizer(result.mle.result))? Because you calculate the standard deviations in the transformed (log) space as sqrt.(diag(Optim.trace(result.mle.result)[end].metadata["~inv(H)"])) then you have to normalize them by multiplying by the means also in the transformed space which are Optim.minimizer(result.mle.result), and then you should transform them. Realistically I don't think you can directly transform standard errors like this anyway so the more robust way is probably to compute a confidence interval in the transformed (log) space and then transform that back to the original space but this is somewhat low priority for now.

cgarling commented 1 year ago

Might even be better off reporting upper and lower 1-sigma ranges rather than a +- value because of this transformation business

cgarling commented 4 months ago

Using these standard errors is not the recommended way of obtaining uncertainties anyway; we now prefer sampling from the MAP result or via HMC.