compute_rsquared | R Documentation |

The approach is not fully Bayesian and provides a global estimate rather than an estimate for each sample (this is because the predictive means and residual variance are estimated from replications than given by the model).

compute_rsquared(yrep)

`yrep` |
Matrix with rows representing samples and columns representing observations |

Bayesian R-squared (scalar, between 0 and 1)

N <- 50 N_sample <- 1e2 y <- runif(N, 0, 10) yrep <- do.call(cbind, lapply(1:N, function(i) { y[i] + rnorm(N_sample) })) compute_rsquared(yrep)

ghurault/HuraultMisc documentation built on Aug. 1, 2022, 3:11 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.