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
If you test this code, you’ll see that there will be some confusion within R on the length of your generated data (n), the probability statement (prob) and the size. An alternative to your implementation might be the one below.
To do:
NEWS
entryTobias Mielke found a (likely) bug in our package:
I think he has a point here, and Regina Stegherr agress as well. We propose to replace
through
Simple exploration like
haz <- c(0.2, 0.3, 0.5)
haz_all <- sum(haz)
table(sample(1:3, size = 10^6, prob = haz / haz_all, replace = TRUE))/10^6
seems to show that this does the right thing.
The text was updated successfully, but these errors were encountered: