You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Phi_approx is not as robust in the tails as normal_lcdf #352
generated quantities {
vector[3] x;
vector[3] y;
real w;
real z;
real a;
x[1] =normal_lcdf(8 | 0, 1);
x[2] =normal_lcdf(9 | 0, 1);
x[3] =normal_lcdf(10 | 0, 1);
y[1] =log(Phi_approx(8));
y[2] =log(Phi_approx(9));
y[3] =log(Phi_approx(10));
w =log_diff_exp(y[3], y[2]);
z =log_diff_exp(x[3], x[2]);
a =log(Phi_approx(10) -Phi_approx(9));
}
If I check out
>out$summary(c("w", "z", "a"))
# A tibble: 3 x 10variablemeanmediansdmadq5q95rhatess_bulkess_tail<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>1w-Inf-InfNaNNA-Inf-InfNANANA2z-43.6-43.600-43.6-43.6NANANA3a-Inf-InfNaNNA-Inf-InfNANANA
Looking at
for (i in1:40) {
b[i] =normal_lcdf(i | 0, 1);
c[i] =log(Phi_approx(i));
}
Activity
rok-cesnovar commentedon Apr 13, 2021
This probably changed after stan-dev/math#1411
spinkney commentedon Apr 13, 2021
btw a vectorized
log_Phi()that is robust (as in your posted linked issue) would be great to have for copulasspinkney commentedon Apr 13, 2021
Part of this is a math issue though. Since
normal_lcdf(x | 0, 1)does not output the same asPhi()the tails.Issue: stan-dev/math#2470 (comment)