mypvalue: Find P-value and plots tcalc with rejection regions

Description Usage Arguments Value Examples

View source: R/mypvalue.R

Description

This function, given the tcalc value, will find the p-value, and plot the distribution with the rejection regions shaded in green. The function also marks the locations of the tcalc values and lets the user determine whether a null hypothesis can be rejected or not

Usage

1
mypvalue(t0, xmax = 4, n = 20, alpha = 0.05)

Arguments

t0

tcalc value

xmax

plot bounds

n

sample size

alpha

alpha value

Value

gives a quantile value and the p-value. Also plots the distribution with the rejection regions shaded in, the p-value as the title, and the tcalc values marked.

Examples

1
2
mypvalue(tcalc, n=30, alpha=0.05)
mypvalue(tcalc, n=20, alpha=0.1)

eric7chen/MATH4753chen0122 documentation built on April 25, 2021, 1:47 a.m.