pnull: Calculates the proportion of points in a vector greater than...

View source: R/SDS100_pnull_shuffle_resample_pairs.R

pnullR Documentation

Calculates the proportion of points in a vector greater than a specified value

Description

Calculates the proportion of points in a vector greater than a specified value

Usage

pnull(obs_stat, null_dist, lower.tail = TRUE)

Arguments

obs_stat

An "observed statistic" value which will be used to assess how many points in the null_dist are greater than this value.

null_dist

A vector of data consistent with a null hypothesis.

lower.tail

A Boolean indicating whether one should return the proportion of points less than or equal to the obs_stat value.

Examples

 set.seed(100)
 obs_stat <- 3
 null_dist <- rnorm(1000)
 pnull(obs_stat, null_dist)


emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.