calc_qqplot {samplr} | R Documentation |
QQ-Plot Calculator
Description
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.
Usage
calc_qqplot(chain, change = TRUE, plot = FALSE)
Arguments
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. |
Value
A list with the theoretical and empirical quantiles, and the intercept and slope of the line connecting the points
Examples
set.seed(1)
chain1 <- sampler_mh(1, "norm", c(0,1), diag(1))
calc_qqplot(chain1[[1]], plot = TRUE)
[Package samplr version 1.0.1 Index]