View source: R/getMomentsOfPDF.r
getMomentsOfPDF | R Documentation |
This function samples a Probability Distribution Function, and returns the moments of that PDF.
getMomentsOfPDF(PDFps, values, samples = 50000)
PDFps |
A vector containing the proportions of the PDF. |
values |
A vector containing the values (x-axis) of the CDF. |
samples |
A number containing the number of samples to be used in the simulation. DEFAULT = 50000. |
A dataframe that contains the moments of the simulated values from the PDF ("Q25" (the 25th quartile); "Q50" (the median); "mean" (the mean); "Q75" (the 75th quartile)
getMomentsOfPDF (PDFvector, valueVector)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.