pcdfs: R2 values with corresponding probability density and...

Description Usage Arguments Value Author(s) Examples

View source: R/Percentile_Analysis_Functions_v2.R

Description

This function builds a data frame of all possible R2 values over its range of 0 to 1, with corresponding values of probability (pdf) and cumulative probability (cdf) for a given number of degrees of freedom. R2 is divided uniformly over its range into bins whose width is determined by the number of decimal places chosen (default=3). The number of samples is determined by order (10^order). Values of the cumulative density function (cdf) are used to calculate the baseline noise level, R2p.

Usage

1
pcdfs(dof, order = 6, ndecimals = 3, dist = "normal", par1 = 0, par2 = 1)

Arguments

dof

an integer greater than 1

order

a positive number used to set the order of magnitide of the number of samples (default is 6)

ndecimals

a positive integer describing the number of decimal places desired in the results

dist

a character string identifying the noise distribution. The current list of possible distributions is, 'normal', 'uniform', 'lognormal', 'poisson' and 'binomial'.

par1

one of two parameters used to define the noise distribution For 'normal', par1 = mean, For 'uniform', par1 = min, For 'lognormal', par1 = logmean, For 'poisson', par1=lambda, For 'binomial', par1=size

par2

the second of two parameters used to define the noise distribution For 'normal', par2 = std dev, For 'uniform', par2 = max, For 'lognormal', par2 = log std dev, For 'poisson', par2=(not used), For 'binomial', par2=probability

Value

pcdfs returns a data frame with columns "R2", "pdf" and "cdf". R2 is the full range of values that R2 can possibly have (from 0 to 1) divided by 10^bw where bw (bin width). binwidth is determined by ndecimals so 10^bw = 10^(-ndecimals). pdf is the probability density function – the probability of obtaining a specific range of values of R2 corresponding to one of the bins. Values range from 0 to 1. cdf is the cumulative pdf. Values of cdf also range from 0 to 1.

Author(s)

Joseph G. Kreke, PhD

Examples

1
2
	R2df <- pcdfs(dof=8, order=6, ndecimals=3, dist="uniform")
	R2df <- pcdfs(5)

pAnalysis documentation built on May 2, 2019, 9:17 a.m.