asypow.power {asypow}R Documentation

Asymptotic Power

Description

Calculates the power of a test via likelihood ratio methods.

Usage

     asypow.power(asypow.obj, sample.size, significance)

Arguments

asypow.obj

The object returned from asypow.noncent.

sample.size

The sample size of the study.

significance

The significance level of the test.

Value

Returns the power of the test.

References

Cox, D.R. and Hinkley, D.V. (1974). Theoretical Statistics Chapman and Hall, London.

See Also

asypow.noncent, asypow.n, asypow.sig

Examples

# Single Group Binomial Example:
#    Consider testing the null hypothesis that the binomial
#    probability is p = .2 with a sample size of 47 and
#    signficance level of 0.05. What is the power of the
#    test if p is actually .4?
# Step 1: Find the information matrix
info.binom <- info.binomial.kgroup(.4)
# Step 2: Create the constraints matrix
constraints <- c(1, 1, .2)
# Step 3: Find the noncentrality parameter and
#         degrees of freedom for the test
binom.object <- asypow.noncent(.4, info.binom, constraints)
# Step 4: Compute the power of a test with
#         sample size of 47 and a significance level 0.05
power.binom <- asypow.power(binom.object, 47, 0.05)
print(power.binom)

[Package asypow version 2015.6.25 Index]