Description Usage Arguments Note See Also Examples
Computes the power of the one-sample chi sqare test to test the equivalence of population variances of normal summary values.
1 2 |
rho |
Vector of error quantiles |
scale |
Scaling parameter; typically set to the number of observed summary values |
df |
Degrees of freedom; typically set to |
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 |
norm |
Normalization constant for the truncated power function |
trafo |
Parameter transformation to translate the power |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | n.of.x <- 60
n.of.y <- 60
# compute ABC tolerances
cali <- vartest.calibrate(n.of.x=n.of.x, n.of.y=n.of.y, tau.l=1/2, tau.u=2, what='CR', alpha=0.01)
# problematic ABC tolerances for ABC inference:
# although power is not zero, does not plateau around 1, and still high around rho=1 (desirable),
# the power is not maximised at the point of equality (rho=1).
rho <- seq(0.1, 3, len=1024)
tmp <- data.frame(rho=rho, power=vartest.pow(rho, n.of.x, n.of.y-1, cali['c.l'], cali['c.u']))
p <- ggplot(tmp,aes(x=rho,y=power)) + geom_line() + labs(y='Power\n(ABC acceptance probability)')
print(p)
# power increases with tau.u and becomes flat
tmp <- lapply(seq(1.2,2.8,0.4),function(tau.u)
{
cali <- vartest.calibrate(n.of.x=n.of.x, n.of.y=n.of.y, tau.l=1/tau.u, tau.u=tau.u, what='CR', alpha=0.01)
data.table(rho=rho, power=vartest.pow(rho, n.of.x, n.of.y-1, cali['c.l'], cali['c.u']), tau.u=tau.u)
})
tmp <- do.call('rbind', tmp)
p <- ggplot(tmp,aes(x=rho,y=power,colour=tau.u, group=tau.u)) + geom_line() + labs(x=expression(rho), 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.