8 Matching Annotations
  1. Last 7 days
    1. probs = c() for (k in 1:K) { probs = c(probs, exp(LP[[k]]))} probs = probs / sum(probs)

      This does not depend on i. You can do it outside of the for loop only once, instead of repeating the calculation 4000 times.

    2. # True probabilities bp = c(2, 0, 2, -2)

      This is confusing. How are these probabilities? you mean parameters? but the parameters beta in the text were different: -2, 0, 2, 4.

  2. Jul 2025