fx_PropTest_1p: Determine Alpha/Beta values for 1-sample Proportion Test

Description Usage Arguments Value

View source: R/PropTest.R

Description

This function takes a provided set of constraints for a one sample proportion test including a vector of test observation counts and determines the number of observations (from the provided vector) required to surpass the provided Alpha and Beta thresholds. Essentially, this is to combine both significance testing and power analysis.

Usage

1
fx_PropTest_1p(siglevel, betalevel, obs, alternative, nullp, altp)

Arguments

siglevel

The desired Alpha level, i.e. Type I Error - probability of a false positive

betalevel

The desired Beta level, i.e. Type II Error - probability of a false negative

obs

Vector of potential sample sizes

alternative

The method of determining a difference in provided proportions: "greater", "less", "two.sided"

nullp

The null hypothesis proportion

altp

The alternative hypothesis proportion

Value

A named list that includes: a data.frame with alpha, beta, and power values for the given vector of observations; a plot that shows the aforementioned data.frame as well as the observation counts that meet the given alpha and beta thresholds; the observation counts that meet the given alpha and beta thresholds.


crcastillo/DSTools documentation built on Nov. 4, 2019, 9:17 a.m.