Skip to content

Commit

Permalink
fix typo in generate_random_effect
Browse files Browse the repository at this point in the history
  • Loading branch information
santikka committed Feb 16, 2023
1 parent 20d3734 commit 85a0baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/predict_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ generate_random_effect <- function(nu, sigma_nu, corr_matrix_nu, n_draws,
for (i in seq_len(n_draws)) {
s <- diag(sigma_nu[, i])
e <- eigen(s %*% corr_matrix_nu[, , i] %*% s)
x[, , i] <- matrix(rnorm(n_new * M), n_nrow = n_new) %*%
x[, , i] <- matrix(rnorm(n_new * M), nrow = n_new) %*%
diag(sqrt(pmax(e$values, 0)), M) %*%
t(e$vectors)
}
Expand Down

0 comments on commit 85a0baf

Please sign in to comment.