View source: R/densityExpressions.R
densityExpressions | R Documentation |
Function containing expressions of density and cumulative functions, plus the first and second derivatives.
densityExpressions(strDistribution = "normal", eDensityFun = NA)
strDistribution |
Distribution input between "normal" (Normal distribution), "logNormal" (logNormal distribution), "weibull" (Weibull distribution), "logLogistic" (logLogistic distribution), "gpd2" (Generalized Pareto Distribution with two parameters) or "custom" if the distribution is written by the user. |
eDensityFun |
The density of a two parameters distribution. This should be an expression object, the two parameters should be called "nTheta1" and "nTheta2", the data "nvData" and its formula should be derivable |
Returns list containing all the symbolic functions.
# Generates the Normal distribution input for OBRE
distrForOBRE <- densityExpressions(strDistribution = "normal")
# The same result can be generated by inserting manually the formula
distrForOBRE <- densityExpressions(strDistribution = "custom",
eDensityFun = expression((exp( -((nvData - nTheta1)^2) / (2 * nTheta2^2)) /
(sqrt(2 * pi) * nTheta2))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.