-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qqmath.permustats and reference distribution #172
Comments
Even with your notes in the examples, the plots for set.seed(0)
xx <- rt(10000, df = 10)
qqmath(~ xx, pch = "+", distribution = qnorm,
grid = TRUE, abline = c(0, 1),
xlab.top = c("raw", "ppoints(100)", "tails.n = 50"),
panel = function(..., f.value) {
switch(panel.number(),
panel.qqmath(..., f.value = NULL),
panel.qqmath(..., f.value = ppoints(100)),
panel.qqmath(..., f.value = ppoints(100), tails.n = 50))
}, layout = c(3, 1))[c(1,1,1)] So, we could easily modify
I'll have a go at implementing this for |
I think a custom panel function that accepts a vector * == famous last words |
I think |
qqmath
function accepts argumentdistribution
to find the expected quantiles in the Q-Q plot. The default is to plot permutations against Gaussian distribution (qnorm
). However, this is a bad choice in several cases. For instance,example(permutest.betadisper)
gives:One panel shows F-statistic and another shows t-statistic which have different scales and shapes. It is possible to have separate scales for panels (
scales = list(relation = "free")
), but the shapes are still different. It is possible to give thedistribution
used for the theoretical quantile (horizontal axis), but it is more tedious to do this separately for each panel (see?panel.qqmath
), and getting the scaling right is even more cumbersome (I think this would need writing aprepanel
function). However, actually we would like to get something like this:Here
F
is plotted against F-distribution andt
against t-distribution, both with correct degrees of freedom and using separate scaling. This is much better than the current plot for diagnostic purposes.I didn't find a nice way to do this with
qqmath
, and the quick graph above is based on the ideaxyplot(permuted ~ expected | statistic, scales = list(relation = "free"), abline = c(0,1))
.To do this in general, we should
permustats
method when this makes sense. The default would be to have nothing and relying onqqmath
using Gaussian distribution. I think the new item should be given forbetadisper
,adonis
andanova.cca
methods.qqmath.permustats
to use the reference distribution for each panel when such is given. This is the harder part to get right.The text was updated successfully, but these errors were encountered: