tdMoments: Calculate moments for the fitted 'timedist' model

Description Usage Arguments Value Examples

View source: R/moments.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

1
2
3
4
5
6
7
8
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)

nlstimedist documentation built on Aug. 27, 2020, 9:07 a.m.