Learn R Programming

⚠️There's a newer version (1.1.9) of this package.Take me there.

matrixdist

Statistics for Matrix Distributions

This package implements tools which are useful for the statistical analysis of homogeneous and in-homogeneous phase--type distributions. These distributions are absorption times of Markov jump processes, and thus the maximization of their likelihood for statistical estimation is best dealt with using the EM algorithm.

The main method for fitting in-homogeneous phase--type is fit, which allows data to be right-censored or aggregated. Several in-homogeneity transforms are considered, as well as the most common sub-intensity matrix structures.

Simulation can be efficiently performed using the method sim. Various other methods for computing functionals of in-homogeneous phase--type objects are the following: dens (density), cdf (cumulative distribution function), haz (hazard rate), and quan (quantile).

For phase--type distributions, the additional methods minimum, maximum, "+" obtain the matrix representations of the resulting phase--type distribution obtained through their application to two random variables. The method moment computes exact moments of phase--type distributions of any order.

Finally, show, coef, logLik are auxiliary methods for visualizing, extracting coefficients and log-likelihood of phase--type objects, respectively.

Copy Link

Version

Install

install.packages('matrixdist')

Monthly Downloads

240

Version

1.0

License

GPL-3

Maintainer

Martin Bladt

Last Published

January 8th, 2021

Functions in matrixdist (1.0)

a_rungekutta

Runge Kutta for the calculation of the a vectors in a EM step
clone_matrix

Clone a matrix
clone_vector

Clone a vector
EMstep_RK

EM step using Runge Kutta
cdf,ph-method

Distribution Method for phase type distributions
coef,ph-method

Coef Method for ph Class
cdf

New Generic for the Distribution of Matrix Distributions
cdf,iph-method

Distribution Method for inhomogeneous phase type distributions
coef,iph-method

Coef Method for iph Class
embeddedMC

Embedded Markov chain of a sub-intensity matrix
fit,ph-method

Fit Method for ph Class
iph-class

Inhomogeneous Phase Type distributions
minimum,ph,ph-method

Minimum Method for phase type distributions
cumulateMatrix

Cumulate matrix
matrixdist-package

Statistics for Matrix Distributions
maximum,iph,iph-method

Maximum Method for inhomogeneous phase type distributions
minimum,iph,iph-method

Minimum Method for inhomogeneous phase type distributions
cumulateVector

Cumulate vector
LInf_norm

L-oo norm of a matrix
iph

Constructor Function for inhomogeneous phase type distributions
ph-class

Phase Type distributions
derivativeMatrixweibull

Derivative of matrix Weibull
matrixMax

Maximum entry in a matrix
mgevcdf

Matrix GEV cdf
fit

New Generic for Estimating Matrix Distributions
mgevden

Matrix GEV density
matrixMaxDiagonal

Maximum entry in the diagonal of a matrix
haz,ph-method

Hazard rate Method for phase type distributions
diagonal_vector

Creates a matrix with the given vector in the diagonal
initialState

Initial state of Markov jump process
haz

New Generic for the Hazard rate of Matrix Distributions
logLikelihoodMgompertz_RK

Loglikelihood of matrix Gompertz using RK
default_step_length

Default size of the steps in the RK
mgompertzcdf

Matrix Gompertz cdf
matrix_VanLoan

Creates the matrix (A1, B1 ; 0, A2)
dens,iph-method

Density Method for inhomogeneous phase type distributions
matrix_exponential

Matrix exponential algorithm
logLik,ph-method

logLik Method for ph Class
dens

New Generic for the Density of Matrix Distributions
dens,ph-method

Density Method for phase type distributions
logLikelihoodMlognormal_RK

Loglikelihood of matrix LogNormal using RK
logLikelihoodMgev_RK

Loglikelihood of matrix GEV using RK
logLikelihoodMloglogistic_RK

Loglikelihood of matrix Log-Logistic using RK
ph

Constructor Function for phase type distributions
logLikelihoodMweibull_RK

Loglikelihood of matrix Weibull using RK
minimum

New Generic for Minimum of two Matrix Distributions
logLikelihoodPH_RK

Loglikelihood using RK
mloglogisticcdf

Matrix Log-Logistic cdf
mweibullden

Matrix Weibull density
rmatrixgev

Random matrix GEV
mparetocdf

Matrix Pareto cdf
moment

New Generic for Moment of Matrix Distributions
newState

New state in a Markov jump process
matrix_inverse

Inverse of a matrix
rphasetype

Random phase-type
mgompertzden

Matrix Gompertz density
mlognormalden

Matrix LogNormal density
quan

New Generic for the Quantile of Matrix Distributions
quan,ph-method

Quantile Method for phase type distributions
+,ph,ph-method

Sum Method for phase type distributions
mloglogisticden

Matrix Log-Logistic density
maximum

New Generic for Maximum of two Matrix Distributions
matrix_power

Computes A^n
maximum,ph,ph-method

Maximum Method for phase type distributions
moment,ph-method

Moment Method for phase type distributions
mweibullcdf

Matrix Weibull cdf
mparetoden

Matrix Pareto density
mlognormalcdf

Matrix LogNormal cdf
reversTransformData

Applies the inverse of the GEV but giving back the vector in reverse order
sim,ph-method

Simulation Method for phase type distributions
riph

Random inhomogeneous phase-type
sim

New Generic for Simulating Matrix Distributions
sumPH

Computes the initial distribution and sub-intensity of the sum of PH
show,iph-method

Show Method for inhomogeneous phase type distributions
runge_kutta

Runge Kutta for the calculation of the a,b and c vectors in a EM step
solve_linear_system

Solves a system with multiple right hand sides
random_structure

Random structure of a phase-type
phcdf

Phase-type cdf or tail
matrix_product

Product of two matrices
logLikelihoodMpareto_RK

Loglikelihood of matrix Pareto using RK
matrix_sum

Add matrices
phdensity

Phase-type density
show,ph-method

Show Method for phase type distributions
sim,iph-method

Simulation Method for inhomogeneous phase type distributions