set.seed(666)
x <- rt(10000, df = 3) + rnorm(10000)
s <- 1
res <- ebnm_point_normal(x, s, mode="estimate")
gives
Error in mle_point_normal(x_optset, s_optset, g, control, fix_pi0, fix_a, :
Re-attempt at optimization failed, possibly due to one or more very small standard errors. The smallest nonzero standard error seen during optimization was 1.
In addition: Warning message:
In mle_point_normal(x_optset, s_optset, g, control, fix_pi0, fix_a, :
First optimization attempt failed. Retrying with fewer significant digits.
Called from: mle_point_normal(x_optset, s_optset, g, control, fix_pi0, fix_a,
fix_mu)
gives