Description Usage Arguments Details Value Methods (by class) Examples
Goodness-of-fit using arc lengths.
1 2 3 4 5 6 7 8 9 |
n |
An integer specifying the sample size. |
bootstraps |
An integer specifying the size of the parametric bootstrap. |
mu |
A real value specifying the mean of the normal distribution. |
sigma |
A positive real number specifying the scale parameter of the normal distribution. |
q1, q2 |
Vectors specifying the quantiles (or points if quantile=FALSE) over which arc length segments are to be computed. |
quantile |
TRUE/FALSE whether q1 and q2 are quantiles, or elements of the domain of |
dc |
TRUE/FALSE: Should the discrete or continuous sample statistic be used. |
type |
The type of bandwidth estimator for the underlying KDE; see |
X |
A vector of sample values. |
... |
Additional arguments passed to |
x |
An alEtest object. |
First the distributional parameters of a sample is estimated using the continuous arc length sample statistic (see alE
). The calculated sample arc length statistic is then compared to the distribution of that particular sample statistic, obtained by a parametric bootstrap, using the estimated parameters (see alEdist
). This finally leads to the calculation of a p-value for a goodness-of-fit test, based on the simulated distribution.
This method is currently only implemented for the normal distribution, and for a single arc length segment.
alEdist: A vector (matrix) of arc lengths over the specified interval(s), i.e. the simulated distribution for the chosen sample arc length statistic.
alEtest: A generic S3 object with class alEtest.
alEtest.default: A list with the following components:
q1, q2: The segment over which the arc length was calculated.
mu: A real value specifying the mean of the normal distribution.
sigma: A positive real number specifying the scale parameter of the normal distribution.
bw: The bandwidth for the kernel density estimator.
dist: A numeric matrix whose columns represent a bootstrap distribution for the corresponding sample arc length statistic.
statistic: The value of the observed sample statistic.
pvalue: The p-value for the test based on a parametric bootstrap sample.
bootstraps: Number of bootstrap samples.
default
: default method for alEtest.
alEtest
: print method for alEtest.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
alEdist(50, 100, 2, 3.5, 0.025, 0.975, TRUE, TRUE, -1)
alEdist(50, 100, 2, 3.5, c(0.025,0.5), c(0.5,0.975), TRUE, TRUE, -1)
alEdist(50, 100, 2, 3.5, 0.025, 0.975, TRUE, FALSE, -1)
alEdist(50, 100, 2, 3.5, c(0.025,0.5), c(0.5,0.975), TRUE, FALSE, -1)
alEdist(50, 100, 2, 3.5, qnorm(0.025,2,3.5),
qnorm(0.975, 2, 3.5), FALSE, FALSE, -1)
alEdist(50, 100, 2, 3.5, c(qnorm(0.025, 2, 3.5),2),
c(2,qnorm(0.975, 2, 3.5)), FALSE, FALSE, -1)
## End(Not run)
## Not run:
x <- rnorm(1000)
s1 <- alE(x, 0.025, 0.975, TRUE, -1)
alEtest(x, mu=s1$par[1], sigma=s1$par[2], q1=0.025, q2=0.975,
type=-1, bootstraps=50)
s2 <- alE(x, 0.025, 0.975, FALSE, -1)
alEtest(x, mu=s2$par[1], sigma=s2$par[2], q1=0.025, q2=0.975,
type=-1, bootstraps=50)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.