test.prop1: Hypothesis test for a single proportion

View source: R/statpsych3.R

test.prop1R Documentation

Hypothesis test for a single proportion

Description

Computes a continuity-corrected z test for a single proportion in a 1-group design.

Usage

test.prop1(f, n, h)

Arguments

f

number of participants who have the attribute

n

sample size

h

population proportion under null hypothesis

Value

Returns a 1-row matrix. The columns are:

  • Estimate - ML estimate of proportion

  • z - z test statistic

  • p - p-value

References

\insertRef

Snedecor1980statpsych

Examples

test.prop1(9, 20, .2)

# Should return:
#      Estimate        z          p
# [1,]     0.45 2.515576 0.01188379



statpsych documentation built on July 9, 2023, 6:50 p.m.