# Statistics for Matrix Distributions

## Documentation for package ‘matrixdist’ version 1.1.9

- DESCRIPTION file
- Package NEWS
- Package README

## Help Pages

A B C D E F H I L M N P Q R S T V misc

matrixdist-package | Statistics for Matrix Distributions

## -- A --

a_rungekutta | Runge-Kutta for the calculation of the a vector in a EM step

## -- B --

bivdph | Constructor function for bivariate discrete phase-type distributions
bivdph-class | Bivariate discrete phase-type distributions
bivdph_density | Bivariate discrete phase-type joint density of the feed forward type
bivdph_tail | Bivariate discrete phase-type joint tail of the feed forward type
biviph | Constructor function for bivariate inhomogeneous phase-type distributions
biviph-class | Bivariate inhomogeneous phase-type distributions
bivph | Constructor function for bivariate phase-type distributions
bivph-class | Bivariate phase-type distributions
bivph_density | Bivariate phase-type joint density of the feed forward type
bivph_laplace | Bivariate phase-type joint Laplace
bivph_tail | Bivariate phase-type joint tail of the feed forward type

## -- C --

cdf | New generic for the distribution of matrix distributions
cdf-method | Distribution method for discrete phase-type distributions
cdf-method | Distribution method for inhomogeneous phase-type distributions
cdf-method | Distribution method for multivariate inhomogeneous phase-type distributions
cdf-method | Distribution method for multivariate phase-type distributions
cdf-method | Distribution method for phase-type distributions
clone_matrix | Clone a matrix
clone_vector | Clone a vector
coef-method | Coef method for bivdph class
coef-method | Coef method for biviph class
coef-method | Coef method for bivph class
coef-method | Coef method for dph Class
coef-method | Coef method for iph class
coef-method | Coef method for mdph class
coef-method | Coef method for ph class
coef-method | Coef method for sph Class
cor-method | Cor method for MPHstar class
cor-method | Cor method for bivdph class
cor-method | Cor method for bivph class
cor-method | Cor method for multivariate discrete phase-type distributions
cor-method | Cor method for multivariate phase-type distributions
cumulate_matrix | Cumulate matrix
cumulate_vector | Cumulate vector

## -- D --

default_step_length | Default size of the steps in the RK
dens | New generic for the density of matrix distributions
dens-method | Density method for bivariate discrete phase-type distributions
dens-method | Density method for bivariate inhomogeneous phase-type distributions
dens-method | Density method for bivariate phase-type distributions
dens-method | Density method for discrete phase-type distributions
dens-method | Density method for inhomogeneous phase-type distributions
dens-method | Density method for multivariate discrete phase-type distributions
dens-method | Density method for multivariate inhomogeneous phase-type distributions
dens-method | Density method for multivariate phase-type distributions
dens-method | Density method for phase-type distributions
dph | Constructor function for discrete phase-type distributions
dph-class | Discrete phase-type distributions
dphcdf | Discrete phase-type cdf
dphdensity | Discrete phase-type density
dph_pgf | Pgf of a discrete phase-type distribution

## -- E --

embedded_mc | Embedded Markov chain of a sub-intensity matrix
EMstep_bivdph | EM for discrete bivariate phase-type
EMstep_bivdph_MoE | EM for discrete bivariate phase-type MoE
EMstep_bivph | EM for bivariate phase-type distributions using Pade for matrix exponential
EMstep_dph | EM for discrete phase-type
EMstep_dph_MoE | EM for discrete phase-type MoE
EMstep_mdph | EM for multivariate discrete phase-type
EMstep_mdph_MoE | EM for multivariate discrete phase-type MoE
EMstep_MoE_PADE | EM for PH-MoE
EMstep_PADE | EM for phase-type distributions using Pade approximation for matrix exponential
EMstep_RK | EM step for phase-type using Runge-Kutta
EMstep_UNI | EM for phase-type using uniformization for matrix exponential
EM_step_mPH_rc | EM step for the mPH class with right-censoring, for different marginal sub-intensity matrices
evaluate | New generic for evaluating survival matrix distributions
evaluate-method | Evaluation method for sph Class
expmat | Matrix exponential
expm_terms | expm terms of phase-type likelihood using uniformization

## -- F --

find_n | Find n such that P(N > n) = h with N Poisson distributed
find_weight | Find weight of observations
Fisher | New generic for obtaining the Fisher information of survival matrix distributions
Fisher-method | Fisher information method for sph class
fit | New generic for estimating matrix distributions
fit-method | Fit method for mph class
fit-method | Fit method for bivdph Class
fit-method | Fit method for bivph Class
fit-method | Fit method for dph class
fit-method | Fit method for mdph Class
fit-method | Fit method for mph Class
fit-method | Fit method for ph class

## -- H --

haz | New generic for the hazard rate of matrix distributions
haz-method | Hazard rate method for phase-type distributions

## -- I --

inf_norm | L inf norm of a matrix
initial_state | Initial state of Markov jump process
iph | Constructor function for inhomogeneous phase-type distributions
iph-class | Inhomogeneous phase-type distributions

## -- L --

laplace | New generic for Laplace transform of matrix distributions
laplace-method | Laplace method for bivph class
laplace-method | Laplace method for multivariate phase-type distributions
laplace-method | Laplace method for phase-type distributions
linCom | New generic for linear combinations of multivariate matrix distributions
linCom-method | Linear combination method for MPHstar class
linCom-method | Linear combination method for bivariate phase-type distributions
linear_combination | Computes PH parameters of a linear combination of vector from MPHstar
logLik-method | Loglikelihood method for ph class
logLikelihoodbivDPH | Loglikelihood for bivariate discrete phase-type
logLikelihoodbivDPH_MoE | Loglikelihood for bivariate discrete phase-type MoE
logLikelihoodbivPH | Loglikelihood for Bivariate PH
logLikelihoodDPH | Loglikelihood for discrete phase-type
logLikelihoodDPH_MoE | Loglikelihood for discrete phase-type MoE
logLikelihoodmDPH | Loglikelihood for multivariate discrete phase-type
logLikelihoodmDPH_MoE | Loglikelihood for multivariate discrete phase-type MoE
logLikelihoodMgev_PADE | Loglikelihood of matrix-GEV using Pade
logLikelihoodMgev_RK | Loglikelihood of matrix-GEV using Runge-Kutta
logLikelihoodMgev_UNI | Loglikelihood of matrix-GEV using uniformization
logLikelihoodMgompertz_PADE | Loglikelihood of matrix-Gompertz using Pade
logLikelihoodMgompertz_PADEs | Loglikelihood of PI with matrix-Gompertz using Pade
logLikelihoodMgompertz_RK | Loglikelihood of matrix-Gompertz using Runge-Kutta
logLikelihoodMgompertz_RKs | Loglikelihood of PI with matrix-Gompertz using Runge-Kutta
logLikelihoodMgompertz_UNI | Loglikelihood of matrix-Gompertz using uniformization
logLikelihoodMgompertz_UNIs | Loglikelihood of PI with matrix-Gompertz using Uniformization
logLikelihoodMloglogistic_PADE | Loglikelihood of matrix-loglogistic using Pade
logLikelihoodMloglogistic_PADEs | Loglikelihood of PI with matrix-loglogistic using Pade
logLikelihoodMloglogistic_RK | Loglikelihood of matrix-loglogistic using Runge-Kutta
logLikelihoodMloglogistic_RKs | Loglikelihood of PI with matrix-loglogistic using Runge-Kutta
logLikelihoodMloglogistic_UNI | Loglikelihood of matrix-loglogistic using uniformization
logLikelihoodMloglogistic_UNIs | Loglikelihood of PI with matrix-loglogistic using uniformization
logLikelihoodMlognormal_PADE | Loglikelihood of matrix-lognormal using Pade
logLikelihoodMlognormal_PADEs | Loglikelihood of PI with matrix-lognormal using Pade
logLikelihoodMlognormal_RK | Loglikelihood of matrix-lognormal using Runge-Kutta
logLikelihoodMlognormal_RKs | Loglikelihood of PI matrix-lognormal using Runge-Kutta
logLikelihoodMlognormal_UNI | Loglikelihood of matrix-lognormal using uniformization
logLikelihoodMlognormal_UNIs | Loglikelihood of PI with matrix-lognormal using uniformization
logLikelihoodMpareto_PADE | Loglikelihood of matrix-Pareto using Pade
logLikelihoodMpareto_PADEs | Loglikelihood of PI with matrix-Pareto using Pade
logLikelihoodMpareto_RK | Loglikelihood of matrix-Pareto using Runge-Kutta
logLikelihoodMpareto_RKs | Loglikelihood of PI with matrix-Pareto using Runge-Kutta
logLikelihoodMpareto_UNI | Loglikelihood of matrix-Pareto using uniformization
logLikelihoodMpareto_UNIs | Loglikelihood of PI with matrix-Pareto using uniformization
logLikelihoodMweibull_PADE | Loglikelihood of matrix-Weibull using Pade
logLikelihoodMweibull_PADEs | Loglikelihood of PI with matrix-Weibull using Pade
logLikelihoodMweibull_RK | Loglikelihood of matrix-Weibull using Runge-Kutta
logLikelihoodMweibull_RKs | Loglikelihood of PI with matrix-Weibull using Runge-Kutta
logLikelihoodMweibull_UNI | Loglikelihood of matrix-Weibull using uniformization
logLikelihoodMweibull_UNIs | Loglikelihood of PI with matrix-Weibull using uniformization
logLikelihoodPH_MoE | Loglikelihood for PH-MoE
logLikelihoodPH_PADE | Loglikelihood of phase-type using Pade approximation
logLikelihoodPH_PADEs | Loglikelihood of PI with phase-type using Pade
logLikelihoodPH_RK | Loglikelihood of phase-type using Runge-Kutta
logLikelihoodPH_RKs | Loglikelihood of PI with phase-type using Runge-Kutta
logLikelihoodPH_UNI | Loglikelihood of phase-type using uniformization
logLikelihoodPH_UNIs | Loglikelihood of PI with phase-type using uniformization
LRT | New generic for likelihood ratio test between two matrix distribution models
LRT-method | LRT method for ph class

## -- M --

marginal | New generic for the marginals of multivariate matrix distributions
marginal-method | Marginal method for MPHstar class
marginal-method | Marginal method for bivdph class
marginal-method | Marginal method for biviph class
marginal-method | Marginal method for bivph class
marginal-method | Marginal method for mdph class
marginal-method | Marginal method for multivariate inhomogeneous phase-type distributions
marginal-method | Marginal method for multivariate phase-type distributions
marginal_expectation | Marginal conditional expectations
matrixdist | Statistics for Matrix Distributions
matrix_exponential | Matrix exponential
matrix_inverse | Inverse of a matrix
matrix_power | Computes A^n
matrix_product | Product of two matrices
matrix_vanloan | Creates the matrix (A1, B1 ; 0, A2)
maximum | New generic for maximum of two matrix distributions
maximum-method | Maximum method for discrete phase-type distributions
maximum-method | Maximum method for inhomogeneous phase-type distributions
maximum-method | Maximum method for phase-type distributions
max_diagonal | Maximum diagonal element of a matrix
mdph | Constructor function for multivariate discrete phase-type distributions
mdph-class | Multivariate discrete phase-type distributions
mdphdensity | Multivariate discrete phase-type density
mean-method | Mean method for MPHstar class
mean-method | Mean method for bivdph class
mean-method | Mean Method for bivph class
mean-method | Mean method for discrete phase-type distributions
mean-method | Mean method for multivariate discrete phase-type distributions
mean-method | Mean method for multivariate phase-type distributions
mean-method | Mean method for phase-type distributions
merge_matrices | Merges the matrices S11, S12 and S22 into a sub-intensity matrix
mgevcdf | Matrix-GEV cdf
mgevden | Matrix-GEV density
mgf | New generic for mgf of matrix distributions
mgf-method | Mgf method for bivph class
mgf-method | Mgf method for multivariate phase-type distributions
mgf-method | Mgf method for phase-type distributions
mgompertzcdf | Matrix-Gompertz cdf
mgompertzden | Matrix-Gompertz density
minimum | New generic for minimum of two matrix distributions
minimum-method | Minimum method for discrete phase-type distributions
minimum-method | Minimum method for inhomogeneous phase-type distributions
minimum-method | Minimum method for phase-type distributions
miph | Constructor function for multivariate inhomogeneous phase-type distributions
miph-class | Multivariate inhomogeneous phase-type distributions
mixture | New generic for mixture of two matrix distributions
mixture-method | Mixture method for phase-type distributions
mixture-method | Mixture method for phase-type distributions
mloglogisticcdf | Matrix-loglogistic cdf
mloglogisticden | Matrix-loglogistic density
mlognormalcdf | Matrix-lognormal cdf
mlognormalden | Matrix-lognormal density
MoE | New generic for mixture-of-experts regression with matrix distributions
MoE-method | MoE method for bivdph Class
MoE-method | MoE method for dph Class
MoE-method | MoE method for mdph Class
MoE-method | Fit method for mph/miph class, using mixture-of-experts regression
MoE-method | MoE method for ph Class
moment | New generic for moments of matrix distributions
moment-method | Moment method for bivdph class
moment-method | Moment method for bivph class
moment-method | Moment method for discrete phase-type distributions
moment-method | Moment method for multivariate discrete phase-type distributions
moment-method | Moment method for multivariate phase-type distributions
moment-method | Moment method for phase-type distributions
mparetocdf | Matrix-Pareto cdf
mparetoden | Matrix-Pareto density
mph | Constructor function for multivariate phase-type distributions
mph-class | Multivariate phase-type distributions
MPHstar | Constructor function for multivariate phase-type distributions (MPH* class)
MPHstar-class | Multivariate phase-type distributions obtained by transformation via rewards
MPHstar_data_aggregation | Prepare data for the MPHstar_EMstep_UNI
MPHstar_EMstep_UNI | EM step using Uniformization for MPHstar class
mweibullcdf | Matrix-Weibull cdf
mweibullden | Matrix-Weibull density
m_exp_sum | Computes exp(Sx) via series representation

## -- N --

new_state | New state in a Markov jump process
Nfold | New generic for N-fold convolution of two matrix distributions
Nfold-method | Nfold method for phase-type distributions
n_pos | Find how many states have positive reward

## -- P --

pgf | New generic for pgf of matrix distributions
pgf-method | Pgf method for bivariate discrete phase-type distributions
pgf-method | Pgf Method for discrete phase-type distributions
pgf-method | Pgf method for multivariate discrete phase-type distributions
ph | Constructor function for phase-type distributions
ph-class | Phase-type distributions
phcdf | Phase-type cdf
phdensity | Phase-type density
ph_laplace | Laplace transform of a phase-type distribution
plus_states | Find which states have positive reward
pow2_matrix | Computes A^(2^n)

## -- Q --

quan | New generic for the quantile of matrix distributions
quan-method | Quantile method for phase-type distributions

## -- R --

random_reward | Random reward matrix
random_structure | Random structure of a phase-type
random_structure_bivph | Random structure of a bivariate phase-type
rdphasetype | Simulate discrete phase-type
reg | New generic for regression with matrix distributions
reg-method | Regression method for ph Class
revers_data_trans | Applies the inverse of the GEV transformation but giving back the resulting vector in reverse order
rew_sanity_check | Transform a reward matrix with very small rewards to avoid numerical problems
riph | Random inhomogeneous phase-type
rmatrixgev | Random matrix GEV
rMDPHstar | Simulate MDPH*
rMIPHstar | Simulate a MIPH* random vector
rMPHstar | Simulate a MPH* random vector
rphasetype | Simulate phase-type
runge_kutta | Runge-Kutta for the calculation of the a and b vectors and the c matrix in a EM step

## -- S --

show-method | Show method for multivariate phase-type distributions
show-method | Show method for bivariate discrete phase-type distributions
show-method | Show method for bivariate inhomogeneous phase-type distributions
show-method | Show method for bivariate phase-type distributions
show-method | Show method for discrete phase-type distributions
show-method | Show method for inhomogeneous phase-type distributions
show-method | Show method for multivariate discrete phase-type distributions
show-method | Show method for multivariate inhomogeneous phase-type distributions
show-method | Show method for multivariate phase-type distributions
show-method | Show method for phase-type distributions
show-method | Show method for survival phase-type objects
sim | New generic for simulating matrix distributions
sim-method | Simulation method for multivariate phase-type distributions
sim-method | Simulation method for bivariate discrete phase-type distributions
sim-method | Simulation method for bivariate inhomogeneous phase-type distributions
sim-method | Simulation method for bivariate phase-type distributions
sim-method | Simulation method for phase-type distributions
sim-method | Simulation method for inhomogeneous phase-type distributions
sim-method | Simulation method for multivariate discrete phase-type distributions
sim-method | Simulation method for inhomogeneous multivariate phase-type distributions
sim-method | Simulation method for multivariate phase-type distributions
sim-method | Simulation method for phase-type distributions
sph | Constructor function for survival phase-type objects
sph-class | Survival analysis for phase-type distributions
sum_dph | Computes the initial distribution and sub-intensity of the sum of two discrete phase-type distributed random variables
sum_ph | Computes the initial distribution and sub-intensity of the sum of two phase-type distributed random variables.

## -- T --

TVR | New generic for transformation via rewards of a matrix distribution
TVR-method | TVR Method for dph Class
TVR-method | TVR method for ph class
tvr_dph | Performs TVR for discrete phase-type distributions
tvr_ph | Performs TVR for phase-type distributions

## -- V --

var-method | Var method for MPHstar class
var-method | Var method for bivdph class
var-method | Var method for bivph class
var-method | Var method for discrete phase-type distributions
var-method | Var method for multivariate discrete phase-type distributions
var-method | Var method for multivariate phase-type distributions
var-method | Var method for phase-type distributions
vector_of_matrices | Computes the elements S^n / n! until the a given size
vector_of_matrices_2 | Computes the elements S^n / n! until given value of n
vector_of_powers | Computes elements A^n until the given size

## -- misc --

+-method | Sum method for discrete phase-type distributions
+-method | Sum method for phase-type distributions