getMomentsOfPDF: This function fits returns the moments of a Probability...

View source: R/getMomentsOfPDF.r

getMomentsOfPDFR Documentation

This function fits returns the moments of a Probability Distribution Function.

Description

This function samples a Probability Distribution Function, and returns the moments of that PDF.

Usage

getMomentsOfPDF(PDFps, values, samples = 50000)

Arguments

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.

Value

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)

Examples

getMomentsOfPDF (PDFvector, valueVector)

ccpluncw/ccpl_R_RRW documentation built on July 4, 2025, 3:24 p.m.