SimulD {GOFSN} | R Documentation |
This function approximates the predictive prior distribution of statistic D for the SN model. This is achieved by integrating out gamma with respect to the Jeffreys' prior distribution.
SimulD(n, nrep)
n |
size |
nrep |
number of draws from the prior predictive distribution for gamma used to approximate h(t) |
h(t)
is the marginal prior predictive distribution of D obtained by integrating gamma with respect to the Jeffreys'prior. To approximate h(t)
for a particular n
we used M=1000000 draws from the prior using the following 3 steps algorithm:
Step 1
Draw gamma(1,..,m,...M) approx pi(gamma), for M=1000000;
Step 2
for each gamma(m) generate a random sample of size n from the SN model with mu=0 sigma=1 and gamma=gamma(m);
Step 3
for the mth sample calculate the stadistic D on the random sample.
Although the Kolmogorov-Smirnov test in ks.sn
makes use of the approximated quantiles for a set of sample sizes, with this function it is possible to approximate h(t) and to obtain its quantiles for any sample size n.
y |
a vector of simulations that contains a sample of values that aproximate h(t) for a particular n |
Veronica Paton Romero, Universidad Rey Juan Carlos, Spain v.paton@alumnos.urjc.es
Cabras and Castellanos (2008) Default Bayesian goodness-of-fit tests for the skew-normal model.
data(prior.lambda) simulationsD=SimulD(5,10)