vartest.pow: 'vartest' power function

Description Usage Arguments Note See Also Examples

Description

Computes the power of the one-sample chi sqare test to test the equivalence of population variances of normal summary values.

Usage

1
2
vartest.pow(rho, scale, df, c.l, c.u, norm = 1, trafo = 1, support = c(0,
  Inf), log = FALSE)

Arguments

rho

Vector of error quantiles

scale

Scaling parameter; typically set to the number of observed summary values

df

Degrees of freedom; typically set to m-1 where m is the number of simulated summary values

c.l

Lower boundary point of the critical region (equivalent to the lower ABC tolerance epsilon^-)

c.u

Upper boundary point of the critical region (equivalent to the upper ABC tolerance epsilon^+)

norm

Normalization constant for the truncated power function

trafo

Parameter transformation to translate the power

support

Support of the truncated power function

log

If TRUE, the power function is returned on the log scale.

Note

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.

See Also

vartest.pow.norm

Examples

 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)

olli0601/abc.star documentation built on May 24, 2019, 12:53 p.m.