Description Usage Arguments Note See Also Examples
Computes the power function of the two-sided, one-sample gamma test for testing if simulated and observed summary values occur at similar rates. This test is applicable when the observed and simulated summary values are Exponentially distributed, or when Exponentiality cannot be rejected. The testing problem is described in terms of the scale parameter of the Exponential distribution, the reciprocal of the rate parameter.
1 |
rho |
Vector of error quantiles |
c.l |
Lower boundary point of the critical region (equivalent to the lower ABC tolerance |
c.u |
Upper boundary point of the critical region (equivalent to the upper ABC tolerance |
m |
Number of simulated values |
norm |
Normalization constant for the truncated power function |
support |
Support of the truncated power function |
log |
If |
The power function can be truncated to support
and then standardized with norm
.
If one of these is set, the other must be provided too.
ratetest.calibrate
, ratetest.pow.norm
1 2 3 4 5 6 7 8 9 10 11 | n.of.y <- 40
# compute ABC tolerances
cali <- ratetest.calibrate(tau.l=1/2, tau.u=2, n.of.y=n.of.y, what='CR', alpha=0.01)
# compute the power for the range (0.1, 3)
rho <- seq(0.1, 3, len=1024)
tmp <- data.frame(rho=rho, power=ratetest.pow(rho, cali['c.l'], cali['c.u'], m=n.of.y))
library(ggplot2)
p <- ggplot(tmp,aes(x=rho,y=power)) + geom_line() + labs(y='Power\n(ABC acceptance probability)')
print(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.