Description Usage Arguments Value Author(s) References See Also Examples
View source: R/gof.preprocess.R
Preprocesses the comparisons within a simulated set of draws from the null distribution. These comparisons are used to construct a simulated distribution of tail statistics. Since this needs to be done only once, it is abstracted from gof.optimize and gof for computational reasons.
1 | gof.preprocess(simulated, creasingFunction=median)
|
simulated |
A matrix of simulated draws from the null distribution. Each column should represent a coordinate so that each row corresponds to an independent draw from the null distribution. |
creasingFunction |
Which function is used to center the simulations. |
Comparisons |
A matrix of the comparisons for the tail statistics. Each row corresponds to a tail statistic which can be interpreted, for row i, as "How many draws from the null observation had values along exactly i coordinates which were closer to the chosen centrality measure (i.e. mean, median, or mode) than this observation?" Thus, each column corresponds to an observation. |
Iterations |
The number of iterations comprising the simulated draws from the null distribution. |
Variates |
The number of coordinates in the support of the null distribution. |
Original |
The original simulations given from the null distribution, i.e. |
Josh Lospinoso
http://stats.ox.ac.uk/~lospinos
snopgof
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # See ?snopgof for a full description.
# Standard MVN null distribution
m=1000; v=5;
null.obs = rnorm(v)
# Simulate 25 draws from the null distribution
null.sim = matrix(rnorm(m*v),m,v)
# Preprocess the simulations
(null.preproc = gof.preprocess(null.sim))
# Conduct the test
(x<-gof(null.obs, null.preproc))
# Plot the results
plot(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.