nlstimedist (version 2.0.0)

tdMoments: Calculate moments for the fitted timedist model

Description

Calculate individual model summary statistics or use the wrapper, tdMoments(), to calculate all model summary statistics.

Usage

tdMoments(r, c, t, ...)

tdMean(r, c, t, upper = t * 10, ...)

tdVariance(r, c, t, upper = t * 10, ...)

tdSkew(r, c, t, upper = t * 10, ...)

tdKurtosis(r, c, t, upper = t * 10, alternative = FALSE, ...)

tdEntropy(r, c, t, upper = t * 10, ...)

Arguments

r, c, t

numeric(1). Parameters of the Franco distribution.

...

Additional arguments to be passed to stats::integrate().

upper

numeric(1). The upper limit of integration. Defaults to t * 10. Can be infinite for all moment functions except for entropy.

alternative

logical(1). Whether to use the alternative calculation method (TRUE) or not (default: FALSE).

Value

For the individual summary statistic functions, a single numeric; for tdMoments(), a single row data.frame of numerics containing all of the summary statistics as individual columns.

Examples

Run this code
# NOT RUN {
tdMoments(r = 0.1, c = 0.5, t = 120)

tdMean(r = 0.1, c = 0.5, t = 120)
tdVariance(r = 0.1, c = 0.5, t = 120)
tdSkew(r = 0.1, c = 0.5, t = 120)
tdKurtosis(r = 0.1, c = 0.5, t = 120)
tdKurtosis(r = 0.1, c = 0.5, t = 120, alternative = TRUE)
tdEntropy(r = 0.1, c = 0.5, t = 120)
# }

Run the code above in your browser using DataLab