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
We ran into an scenario where a cluster is small such that https://github.com/ntdyjack/fasthplus/blob/main/R/bsf.R#L20 fails. That's because the small cluster is smaller than the t divided by the number of clusters. That is, t / length(q).
We can avoid this by choosing t with code like this:
Otherwise, when t / length(q) is larger than the smallest cluster size, then you run into an error with sample() because replace = FALSE by default. Alternatively,
The problem with the above solution, is that it could result in very low values of t when for example you have clusters that are very small compared to others. Abby @abspangler13 has a case where we have 15 clusters and the smallest one has a size of 8. So the smallest t would then be 15 * 8 = 120 as shown below, which would be very small.
Hi,
We ran into an scenario where a cluster is small such that https://github.com/ntdyjack/fasthplus/blob/main/R/bsf.R#L20 fails. That's because the small cluster is smaller than the
t
divided by the number of clusters. That is,t / length(q)
.We can avoid this by choosing
t
with code like this:Otherwise, when
t / length(q)
is larger than the smallest cluster size, then you run into an error withsample()
becausereplace = FALSE
by default. Alternatively,fasthplus/R/bsf.R
Line 20 in 736494f
sample(replace = TRUE)
but I don't know if this would break your bootstrap assumptions.Created on 2022-03-08 by the reprex package (v2.0.1)
EDIT start
Looks like
reprex
doesn't include thetraceback()
output. Here it is:EDIT end
The problem with the above solution, is that it could result in very low values of
t
when for example you have clusters that are very small compared to others. Abby @abspangler13 has a case where we have 15 clusters and the smallest one has a size of 8. So the smallestt
would then be15 * 8 = 120
as shown below, which would be very small.Best,
Leo
The text was updated successfully, but these errors were encountered: