test.prop {statpsych}R Documentation

Hypothesis test for a proportion

Description

Computes a continuity-corrected z-test for a population proportion in a 1-group design. A confidence interval for a population proportion is a recommended supplement to the z-test (see ci.prop).

Usage

test.prop(f, n, h)

Arguments

f

number of participants who have the attribute

n

sample size

h

null hypothesis value of proportion

Value

Returns a 1-row matrix. The columns are:

References

Snedecor GW, Cochran WG (1989). Statistical Methods, 8th edition. ISU University Pres, Ames, Iowa.

Examples

test.prop(9, 20, .2)

# Should return:
# Estimate        z          p
#     0.45 2.515576 0.01188379



[Package statpsych version 1.6.0 Index]