Skip to contents

ErlangRenewal: renewal function of gamma (lam, k) interarrivals, BerksonCorrelation: Berkson's fallacy correlation, MillsConditionalMean: E(Y | X > x) for a standard bivariate normal, BivNormDependence: mean-square contingency and mutual information, MaximalCorrelation: Renyi maximal correlation of a discrete pair, BetaBinomialPmf: beta-binomial (negative hypergeometric) law, ArSpectralDensity and AcfSpectralDensity: spectral densities, TelegraphProcess: two-state Markov autocorrelation and spectrum, WienerConditionalCorrelation: Brownian-bridge correlation, SimpleEpidemicDuration: moments of the time to total infection, StirlingGammaRatio: Stirling's ratio, and MaAutocorrelation: moving-average autocorrelation. Identical to the Python arm morie.fn.probresults.

Usage

ErlangRenewal(t, lam, k = 2L)

BerksonCorrelation(gamma, a, c)

MillsConditionalMean(x, rho)

BivNormDependence(rho)

MaximalCorrelation(table)

BetaBinomialPmf(k, n, a, b)

ArSpectralDensity(lam, alpha, sigma2 = 1, normalized = TRUE, ngrid = 4096L)

AcfSpectralDensity(lam, rho)

TelegraphProcess(t, lam, alpha, beta)

WienerConditionalCorrelation(s, t, u, v)

SimpleEpidemicDuration(N, lam)

StirlingGammaRatio(t)

MaAutocorrelation(theta, max_lag)

Arguments

t, s, u, v

Times.

lam

Rate, or frequency for spectral densities.

k

Erlang shape, or number of successes for BetaBinomialPmf.

gamma, a, c

Probabilities of disease, other admission and admission for the disease.

x

Threshold.

rho

Correlation, or vector of positive-lag autocorrelations.

table

Joint counts or probabilities (rows X, columns Y).

n

Number of trials.

b

Second beta parameter (with a the first).

alpha

AR coefficients, or first telegraph rate.

sigma2

Innovation variance.

normalized

Divide by the variance so the density integrates to one.

ngrid

Trapezoid points for the variance.

beta

Second telegraph rate.

N

Number initially susceptible.

theta

MA coefficients.

max_lag

Largest lag.

Value

Numeric value, vector, or list.

References

Grimmett, G. R. and Stirzaker, D. R. (2020). Probability and Random Processes, 4th edn. Oxford University Press.

Renyi, A. (1959). On measures of dependence. Acta Mathematica Academiae Scientiarum Hungaricae 10, 441-451.

Examples

ErlangRenewal(1, 2)
#> [1] 0.7545789
BerksonCorrelation(0.1, 0.2, 0.5)
#> [1] 0.4495861
MaximalCorrelation(matrix(c(0.3, 0.1, 0.2, 0.4), 2))$m
#> [1] 0.4082483
MaAutocorrelation(0.5, 2)
#> [1] 1.0 0.4 0.0