View source: R/calc_functions.R
calc_qqplot | R Documentation |
Estimates values for a QQ plot of Empirical values against Theoretical values from a normal distribution, for either the chain points or the distances between successive points. Optionally, returns a plot as well as the values.
calc_qqplot(chain, change = TRUE, plot = FALSE)
chain |
Vector of n length, where n is the number of trials or sampler iterations |
change |
Boolean. If false, it calculates a qqplot of the given chain. If true, it creates a chain of step sizes. |
plot |
Boolean. Whether to plot the QQ plot or just return the values. |
A list with the theoretical and empirical quantiles, and the intercept and slope of the line connecting the points
set.seed(1)
chain1 <- sampler_mh(1, "norm", c(0,1), diag(1))
calc_qqplot(chain1[[1]], plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.