stats_pdf: Calculate Theoretical Statistics for a Valid Power Method PDF

Description Usage Arguments Value References See Also Examples

View source: R/stats_pdf.R

Description

This function calculates the 100*alpha percent symmetric trimmed mean (0 < alpha < 0.50), median, mode, and maximum height of a valid power method pdf, after using pdf_check. It will stop with an error if the pdf is invalid. The equations are those from Headrick & Kowalchuk (2007, doi: 10.1080/10629360600605065).

Usage

1
2
stats_pdf(c, method = c("Fleishman", "Polynomial"), alpha = 0.025, mu = 0,
  sigma = 1, lower = -10, upper = 10, sub = 1000)

Arguments

c

a vector of constants c0, c1, c2, c3 (if method = "Fleishman") or c0, c1, c2, c3, c4, c5 (if method = "Polynomial"), like that returned by find_constants

method

the method used to find the constants. "Fleishman" uses Fleishman's third-order polynomial transformation and "Polynomial" uses Headrick's fifth-order transformation.

alpha

proportion to be trimmed from the lower and upper ends of the power method pdf (default = 0.025)

mu

mean for the continuous variable (default = 0)

sigma

standard deviation for the continuous variable (default = 1)

lower

lower bound for integration of the standard normal variable Z that generates the continuous variable (default = -10)

upper

upper bound for integration (default = 10)

sub

the number of subdivisions to use in the integration; if no result, try increasing sub (requires longer computation time; default = 1000)

Value

A vector with components:

trimmed_mean the trimmed mean value

median the median value

mode the mode value

max_height the maximum pdf height

References

Please see references for pdf_check.

See Also

find_constants, pdf_check

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
stats_pdf(c = c(0, 1, 0, 0, 0, 0), method = "Polynomial", alpha = 0.025)

## Not run: 
# Beta(a = 4, b = 2) Distribution:
con <- find_constants(method = "Polynomial", skews = -0.467707,
                      skurts = -0.375, fifths = 1.403122,
                      sixths = -0.426136)$constants
stats_pdf(c = con, method = "Polynomial", alpha = 0.025)

## End(Not run)

SimMultiCorrData documentation built on May 2, 2019, 9:50 a.m.