This function uses samples from a stanfit object to estimate the error between predicted and observed angles. R-squared is then estimated as 1 minus the variation in the error divided by the total variation in the observed angles.
1 | r.squared.angles(model.fit, obs.angles)
|
model.fit |
stanfit model, containing a_pred as generated quantities: a_pred is the model predicted angle. |
obs.angles |
Vector of observed angles used in model fitting. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.