Package: matrixdist 1.1.9

matrixdist: Statistics for Matrix Distributions

Tools for phase-type distributions including the following variants: continuous, discrete, multivariate, in-homogeneous, right-censored, and regression. Methods for functional evaluation, simulation and estimation using the expectation-maximization (EM) algorithm are provided for all models. The methods of this package are based on the following references. Asmussen, S., Nerman, O., & Olsson, M. (1996). Fitting phase-type distributions via the EM algorithm, Olsson, M. (1996). Estimation of phase-type distributions from censored data, Albrecher, H., & Bladt, M. (2019) <doi:10.1017/jpr.2019.60>, Albrecher, H., Bladt, M., & Yslas, J. (2022) <doi:10.1111/sjos.12505>, Albrecher, H., Bladt, M., Bladt, M., & Yslas, J. (2022) <doi:10.1016/j.insmatheco.2022.08.001>, Bladt, M., & Yslas, J. (2022) <doi:10.1080/03461238.2022.2097019>, Bladt, M. (2022) <doi:10.1017/asb.2021.40>, Bladt, M. (2023) <doi:10.1080/10920277.2023.2167833>, Albrecher, H., Bladt, M., & Mueller, A. (2023) <doi:10.1515/demo-2022-0153>, Bladt, M. & Yslas, J. (2023) <doi:10.1016/j.insmatheco.2023.02.008>.

Authors:Martin Bladt [aut, cre], Jorge Yslas [aut], Alaric Müller [ctb]

matrixdist_1.1.9.tar.gz
matrixdist_1.1.9.zip(r-4.5)matrixdist_1.1.9.zip(r-4.4)matrixdist_1.1.9.zip(r-4.3)
matrixdist_1.1.9.tgz(r-4.4-x86_64)matrixdist_1.1.9.tgz(r-4.4-arm64)matrixdist_1.1.9.tgz(r-4.3-x86_64)matrixdist_1.1.9.tgz(r-4.3-arm64)
matrixdist_1.1.9.tar.gz(r-4.5-noble)matrixdist_1.1.9.tar.gz(r-4.4-noble)
matrixdist_1.1.9.tgz(r-4.4-emscripten)matrixdist_1.1.9.tgz(r-4.3-emscripten)
matrixdist.pdf |matrixdist.html
matrixdist/json (API)
NEWS

# Install 'matrixdist' in R:
install.packages('matrixdist', repos = c('https://martinbladt.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/martinbladt/matrixdist_1.0/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

3.70 score 1 stars 2 scripts 246 downloads 49 exports 13 dependencies

Last updated 1 months agofrom:baa2e790f0. Checks:OK: 1 WARNING: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 21 2024
R-4.5-win-x86_64WARNINGNov 21 2024
R-4.5-linux-x86_64WARNINGNov 21 2024
R-4.4-win-x86_64WARNINGNov 21 2024
R-4.4-mac-x86_64WARNINGNov 21 2024
R-4.4-mac-aarch64WARNINGNov 21 2024
R-4.3-win-x86_64WARNINGNov 21 2024
R-4.3-mac-x86_64WARNINGNov 21 2024
R-4.3-mac-aarch64WARNINGNov 21 2024

Exports:bivdphbiviphbivphcdfcoefcorcsph_densitycsph_density_testcsph_densityrkdensdphevaluatefind_weightFisherfithazinhomogeneity_regiphlaplacelinComlogLikLRTmarginalmarginal_expectationmatrix_powermaximummdphmeanmgfminimummiphmixtureMoEmomentmphMPHstarMPHstar_data_aggregationMPHstar_EMstep_UNINfoldpgfphquanrandom_rewardregshowsimsphTVRvar

Dependencies:cligluelifecyclemagrittrnnetplyrRcppRcppArmadilloreshape2rlangstringistringrvctrs

Readme and manuals

Help Manual

Help pageTopics
Statistics for Matrix Distributionsmatrixdist-package matrixdist
Sum method for discrete phase-type distributions+,dph,dph-method
Sum method for phase-type distributions+,ph,ph-method
Runge-Kutta for the calculation of the a vector in a EM stepa_rungekutta
Constructor function for bivariate discrete phase-type distributionsbivdph
Bivariate discrete phase-type joint density of the feed forward typebivdph_density
Bivariate discrete phase-type joint tail of the feed forward typebivdph_tail
Bivariate discrete phase-type distributionsbivdph-class
Constructor function for bivariate inhomogeneous phase-type distributionsbiviph
Bivariate inhomogeneous phase-type distributionsbiviph-class
Constructor function for bivariate phase-type distributionsbivph
Bivariate phase-type joint density of the feed forward typebivph_density
Bivariate phase-type joint Laplacebivph_laplace
Bivariate phase-type joint tail of the feed forward typebivph_tail
Bivariate phase-type distributionsbivph-class
New generic for the distribution of matrix distributionscdf
Distribution method for discrete phase-type distributionscdf,dph-method
Distribution method for inhomogeneous phase-type distributionscdf,iph-method
Distribution method for multivariate inhomogeneous phase-type distributionscdf,miph-method
Distribution method for multivariate phase-type distributionscdf,mph-method
Distribution method for phase-type distributionscdf,ph-method
Clone a matrixclone_matrix
Clone a vectorclone_vector
Coef method for bivdph classcoef,bivdph-method
Coef method for biviph classcoef,biviph-method
Coef method for bivph classcoef,bivph-method
Coef method for dph Classcoef,dph-method
Coef method for iph classcoef,iph-method
Coef method for mdph classcoef,mdph-method
Coef method for ph classcoef,ph-method
Coef method for sph Classcoef,sph-method
Cor method for bivdph classcor,bivdph-method
Cor method for bivph classcor,bivph-method
Cor method for multivariate discrete phase-type distributionscor,mdph-method
Cor method for multivariate phase-type distributionscor,mph-method
Cor method for MPHstar classcor,MPHstar-method
Bivariate phase-type joint density of the common shock typecsph_density
Bivariate phase-type joint density of the common shock typecsph_density_test
Bivariate phase-type joint density of the common shock typecsph_densityrk
Cumulate matrixcumulate_matrix
Cumulate vectorcumulate_vector
Aggregate data to improve computation speeddata_aggregation
Default size of the steps in the RKdefault_step_length
New generic for the density of matrix distributionsdens
Density method for bivariate discrete phase-type distributionsdens,bivdph-method
Density method for bivariate inhomogeneous phase-type distributionsdens,biviph-method
Density method for bivariate phase-type distributionsdens,bivph-method
Density method for discrete phase-type distributionsdens,dph-method
Density method for inhomogeneous phase-type distributionsdens,iph-method
Density method for multivariate discrete phase-type distributionsdens,mdph-method
Density method for multivariate inhomogeneous phase-type distributionsdens,miph-method
Density method for multivariate phase-type distributionsdens,mph-method
Density method for phase-type distributionsdens,ph-method
Constructor function for discrete phase-type distributionsdph
Pgf of a discrete phase-type distributiondph_pgf
Discrete phase-type distributionsdph-class
Discrete phase-type cdfdphcdf
Discrete phase-type densitydphdensity
EM step for the mPH class with right-censoring, for different marginal sub-intensity matricesEM_step_mPH_rc
Embedded Markov chain of a sub-intensity matrixembedded_mc
EM for discrete bivariate phase-typeEMstep_bivdph
EM for discrete bivariate phase-type MoEEMstep_bivdph_MoE
EM for bivariate phase-type distributions using Pade for matrix exponentialEMstep_bivph
EM for discrete phase-typeEMstep_dph
EM for discrete phase-type MoEEMstep_dph_MoE
EM for multivariate discrete phase-typeEMstep_mdph
EM for multivariate discrete phase-type MoEEMstep_mdph_MoE
EM for PH-MoEEMstep_MoE_PADE
EM for phase-type distributions using Pade approximation for matrix exponentialEMstep_PADE
EM step for phase-type using Runge-KuttaEMstep_RK
EM for phase-type using uniformization for matrix exponentialEMstep_UNI
New generic for evaluating survival matrix distributionsevaluate
Evaluation method for sph Classevaluate,sph-method
expm terms of phase-type likelihood using uniformizationexpm_terms
Matrix exponentialexpmat
Find n such that P(N > n) = h with N Poisson distributedfind_n
Find weight of observationsfind_weight
New generic for obtaining the Fisher information of survival matrix distributionsFisher
Fisher information method for sph classFisher,sph-method
New generic for estimating matrix distributionsfit
Fit method for bivdph Classfit,bivdph-method
Fit method for bivph Classfit,bivph-method
Fit method for dph classfit,dph-method
Fit method for mdph Classfit,mdph-method
Fit method for mph Classfit,mph-method
Fit method for mph classfit,MPHstar-method
Fit method for ph classfit,ph-method
New generic for the hazard rate of matrix distributionshaz
Hazard rate method for phase-type distributionshaz,ph-method
L inf norm of a matrixinf_norm
New generic for regression with matrix distributions, when the inhomogeneity parameter is also regressedinhomogeneity_reg
Regression method for ph Classinhomogeneity_reg,ph-method
Initial state of Markov jump processinitial_state
Constructor function for inhomogeneous phase-type distributionsiph
Inhomogeneous phase-type distributionsiph-class
New generic for Laplace transform of matrix distributionslaplace
Laplace method for bivph classlaplace,bivph-method
Laplace method for multivariate phase-type distributionslaplace,mph-method
Laplace method for phase-type distributionslaplace,ph-method
New generic for linear combinations of multivariate matrix distributionslinCom
Linear combination method for bivariate phase-type distributionslinCom,bivph-method
Linear combination method for MPHstar classlinCom,MPHstar-method
Computes PH parameters of a linear combination of vector from MPHstarlinear_combination
Loglikelihood method for ph classlogLik,ph-method
Loglikelihood for bivariate discrete phase-typelogLikelihoodbivDPH
Loglikelihood for bivariate discrete phase-type MoElogLikelihoodbivDPH_MoE
Loglikelihood for Bivariate PHlogLikelihoodbivPH
Loglikelihood for discrete phase-typelogLikelihoodDPH
Loglikelihood for discrete phase-type MoElogLikelihoodDPH_MoE
Loglikelihood for multivariate discrete phase-typelogLikelihoodmDPH
Loglikelihood for multivariate discrete phase-type MoElogLikelihoodmDPH_MoE
Loglikelihood of matrix-GEV using PadelogLikelihoodMgev_PADE
Loglikelihood of matrix-GEV using Runge-KuttalogLikelihoodMgev_RK
Loglikelihood of matrix-GEV using uniformizationlogLikelihoodMgev_UNI
Loglikelihood of matrix-Gompertz using PadelogLikelihoodMgompertz_PADE
Loglikelihood of PI with matrix-Gompertz using PadelogLikelihoodMgompertz_PADEs
Loglikelihood of matrix-Gompertz using Runge-KuttalogLikelihoodMgompertz_RK
Loglikelihood of PI with matrix-Gompertz using Runge-KuttalogLikelihoodMgompertz_RKs
Loglikelihood of matrix-Gompertz using uniformizationlogLikelihoodMgompertz_UNI
Loglikelihood of PI with matrix-Gompertz using UniformizationlogLikelihoodMgompertz_UNIs
Loglikelihood of matrix-loglogistic using PadelogLikelihoodMloglogistic_PADE
Loglikelihood of PI with matrix-loglogistic using PadelogLikelihoodMloglogistic_PADEs
Loglikelihood of matrix-loglogistic using Runge-KuttalogLikelihoodMloglogistic_RK
Loglikelihood of PI with matrix-loglogistic using Runge-KuttalogLikelihoodMloglogistic_RKs
Loglikelihood of matrix-loglogistic using uniformizationlogLikelihoodMloglogistic_UNI
Loglikelihood of PI with matrix-loglogistic using uniformizationlogLikelihoodMloglogistic_UNIs
Loglikelihood of matrix-lognormal using PadelogLikelihoodMlognormal_PADE
Loglikelihood of PI with matrix-lognormal using PadelogLikelihoodMlognormal_PADEs
Loglikelihood of matrix-lognormal using Runge-KuttalogLikelihoodMlognormal_RK
Loglikelihood of PI matrix-lognormal using Runge-KuttalogLikelihoodMlognormal_RKs
Loglikelihood of matrix-lognormal using uniformizationlogLikelihoodMlognormal_UNI
Loglikelihood of PI with matrix-lognormal using uniformizationlogLikelihoodMlognormal_UNIs
Loglikelihood of matrix-Pareto using PadelogLikelihoodMpareto_PADE
Loglikelihood of PI with matrix-Pareto using PadelogLikelihoodMpareto_PADEs
Loglikelihood of matrix-Pareto using Runge-KuttalogLikelihoodMpareto_RK
Loglikelihood of PI with matrix-Pareto using Runge-KuttalogLikelihoodMpareto_RKs
Loglikelihood of matrix-Pareto using uniformizationlogLikelihoodMpareto_UNI
Loglikelihood of PI with matrix-Pareto using uniformizationlogLikelihoodMpareto_UNIs
Loglikelihood of matrix-Weibull using PadelogLikelihoodMweibull_PADE
Loglikelihood of PI with matrix-Weibull using PadelogLikelihoodMweibull_PADEs
Loglikelihood of matrix-Weibull using Runge-KuttalogLikelihoodMweibull_RK
Loglikelihood of PI with matrix-Weibull using Runge-KuttalogLikelihoodMweibull_RKs
Loglikelihood of matrix-Weibull using uniformizationlogLikelihoodMweibull_UNI
Loglikelihood of PI with matrix-Weibull using uniformizationlogLikelihoodMweibull_UNIs
Loglikelihood for PH-MoElogLikelihoodPH_MoE
Loglikelihood of phase-type using Pade approximationlogLikelihoodPH_PADE
Loglikelihood of PI with phase-type using PadelogLikelihoodPH_PADEs
Loglikelihood of phase-type using Runge-KuttalogLikelihoodPH_RK
Loglikelihood of PI with phase-type using Runge-KuttalogLikelihoodPH_RKs
Loglikelihood of phase-type using uniformizationlogLikelihoodPH_UNI
Loglikelihood of PI with phase-type using uniformizationlogLikelihoodPH_UNIs
New generic for likelihood ratio test between two matrix distribution modelsLRT
LRT method for ph classLRT,ph,ph-method
Computes exp(Sx) via series representationm_exp_sum
New generic for the marginals of multivariate matrix distributionsmarginal
Marginal conditional expectationsmarginal_expectation
Marginal method for bivdph classmarginal,bivdph-method
Marginal method for biviph classmarginal,biviph-method
Marginal method for bivph classmarginal,bivph-method
Marginal method for mdph classmarginal,mdph-method
Marginal method for multivariate inhomogeneous phase-type distributionsmarginal,miph-method
Marginal method for multivariate phase-type distributionsmarginal,mph-method
Marginal method for MPHstar classmarginal,MPHstar-method
Matrix exponentialmatrix_exponential
Inverse of a matrixmatrix_inverse
Computes A^nmatrix_power
Product of two matricesmatrix_product
Creates the matrix (A1, B1 ; 0, A2)matrix_vanloan
Maximum diagonal element of a matrixmax_diagonal
New generic for maximum of two matrix distributionsmaximum
Maximum method for discrete phase-type distributionsmaximum,dph,dph-method
Maximum method for inhomogeneous phase-type distributionsmaximum,iph,iph-method
Maximum method for phase-type distributionsmaximum,ph,ph-method
Constructor function for multivariate discrete phase-type distributionsmdph
Multivariate discrete phase-type distributionsmdph-class
Multivariate discrete phase-type densitymdphdensity
Mean method for bivdph classmean,bivdph-method
Mean Method for bivph classmean,bivph-method
Mean method for discrete phase-type distributionsmean,dph-method
Mean method for multivariate discrete phase-type distributionsmean,mdph-method
Mean method for multivariate phase-type distributionsmean,mph-method
Mean method for MPHstar classmean,MPHstar-method
Mean method for phase-type distributionsmean,ph-method
Merges the matrices S11, S12 and S22 into a sub-intensity matrixmerge_matrices
Matrix-GEV cdfmgevcdf
Matrix-GEV densitymgevden
New generic for mgf of matrix distributionsmgf
Mgf method for bivph classmgf,bivph-method
Mgf method for multivariate phase-type distributionsmgf,mph-method
Mgf method for phase-type distributionsmgf,ph-method
Matrix-Gompertz cdfmgompertzcdf
Matrix-Gompertz densitymgompertzden
New generic for minimum of two matrix distributionsminimum
Minimum method for discrete phase-type distributionsminimum,dph,dph-method
Minimum method for inhomogeneous phase-type distributionsminimum,iph,iph-method
Minimum method for phase-type distributionsminimum,ph,ph-method
Constructor function for multivariate inhomogeneous phase-type distributionsmiph
Multivariate inhomogeneous phase-type distributionsmiph-class
New generic for mixture of two matrix distributionsmixture
Mixture method for phase-type distributionsmixture,dph,dph-method
Mixture method for phase-type distributionsmixture,ph,ph-method
Matrix-loglogistic cdfmloglogisticcdf
Matrix-loglogistic densitymloglogisticden
Matrix-lognormal cdfmlognormalcdf
Matrix-lognormal densitymlognormalden
New generic for mixture-of-experts regression with matrix distributionsMoE
MoE method for bivdph ClassMoE,bivdph-method
MoE method for dph ClassMoE,dph-method
MoE method for mdph ClassMoE,mdph-method
Fit method for mph/miph class, using mixture-of-experts regressionMoE,mph-method
MoE method for ph ClassMoE,ph-method
New generic for moments of matrix distributionsmoment
Moment method for bivdph classmoment,bivdph-method
Moment method for bivph classmoment,bivph-method
Moment method for discrete phase-type distributionsmoment,dph-method
Moment method for multivariate discrete phase-type distributionsmoment,mdph-method
Moment method for multivariate phase-type distributionsmoment,mph-method
Moment method for phase-type distributionsmoment,ph-method
Matrix-Pareto cdfmparetocdf
Matrix-Pareto densitymparetoden
Constructor function for multivariate phase-type distributionsmph
Multivariate phase-type distributionsmph-class
Constructor function for multivariate phase-type distributions (MPH* class)MPHstar
Prepare data for the MPHstar_EMstep_UNIMPHstar_data_aggregation
EM step using Uniformization for MPHstar classMPHstar_EMstep_UNI
Multivariate phase-type distributions obtained by transformation via rewardsMPHstar-class
Matrix-Weibull cdfmweibullcdf
Matrix-Weibull densitymweibullden
Find how many states have positive rewardn_pos
New state in a Markov jump processnew_state
New generic for N-fold convolution of two matrix distributionsNfold
Nfold method for phase-type distributionsNfold,dph-method
New generic for pgf of matrix distributionspgf
Pgf method for bivariate discrete phase-type distributionspgf,bivdph-method
Pgf Method for discrete phase-type distributionspgf,dph-method
Pgf method for multivariate discrete phase-type distributionspgf,mdph-method
Constructor function for phase-type distributionsph
Laplace transform of a phase-type distributionph_laplace
Phase-type distributionsph-class
Phase-type cdfphcdf
Phase-type densityphdensity
Find which states have positive rewardplus_states
Computes A^(2^n)pow2_matrix
New generic for the quantile of matrix distributionsquan
Quantile method for phase-type distributionsquan,ph-method
Random reward matrixrandom_reward
Random structure of a phase-typerandom_structure
Random structure of a bivariate phase-typerandom_structure_bivph
Simulate discrete phase-typerdphasetype
New generic for regression with matrix distributionsreg
Regression method for ph Classreg,ph-method
Applies the inverse of the GEV transformation but giving back the resulting vector in reverse orderrevers_data_trans
Transform a reward matrix with very small rewards to avoid numerical problemsrew_sanity_check
Random inhomogeneous phase-typeriph
Random matrix GEVrmatrixgev
Simulate MDPH*rMDPHstar
Simulate a MIPH* random vectorrMIPHstar
Simulate a MPH* random vectorrMPHstar
Simulate phase-typerphasetype
Runge-Kutta for the calculation of the a and b vectors and the c matrix in a EM steprunge_kutta
Show method for bivariate discrete phase-type distributionsshow,bivdph-method
Show method for bivariate inhomogeneous phase-type distributionsshow,biviph-method
Show method for bivariate phase-type distributionsshow,bivph-method
Show method for discrete phase-type distributionsshow,dph-method
Show method for inhomogeneous phase-type distributionsshow,iph-method
Show method for multivariate discrete phase-type distributionsshow,mdph-method
Show method for multivariate inhomogeneous phase-type distributionsshow,miph-method
Show method for multivariate phase-type distributionsshow,mph-method
Show method for multivariate phase-type distributionsshow,MPHstar-method
Show method for phase-type distributionsshow,ph-method
Show method for survival phase-type objectsshow,sph-method
New generic for simulating matrix distributionssim
Simulation method for bivariate discrete phase-type distributionssim,bivdph-method
Simulation method for bivariate inhomogeneous phase-type distributionssim,biviph-method
Simulation method for bivariate phase-type distributionssim,bivph-method
Simulation method for phase-type distributionssim,dph-method
Simulation method for inhomogeneous phase-type distributionssim,iph-method
Simulation method for multivariate discrete phase-type distributionssim,mdph-method
Simulation method for inhomogeneous multivariate phase-type distributionssim,miph-method
Simulation method for multivariate phase-type distributionssim,mph-method
Simulation method for multivariate phase-type distributionssim,MPHstar-method
Simulation method for phase-type distributionssim,ph-method
Constructor function for survival phase-type objectssph
Survival analysis for phase-type distributionssph-class
Computes the initial distribution and sub-intensity of the sum of two discrete phase-type distributed random variablessum_dph
Computes the initial distribution and sub-intensity of the sum of two phase-type distributed random variables.sum_ph
New generic for transformation via rewards of a matrix distributionTVR
Performs TVR for discrete phase-type distributionstvr_dph
Performs TVR for phase-type distributionstvr_ph
TVR Method for dph ClassTVR,dph-method
TVR method for ph classTVR,ph-method
Var method for bivdph classvar,bivdph-method
Var method for bivph classvar,bivph-method
Var method for discrete phase-type distributionsvar,dph-method
Var method for multivariate discrete phase-type distributionsvar,mdph-method
Var method for multivariate phase-type distributionsvar,mph-method
Var method for MPHstar classvar,MPHstar-method
Var method for phase-type distributionsvar,ph-method
Computes the elements S^n / n! until the a given sizevector_of_matrices
Computes the elements S^n / n! until given value of nvector_of_matrices_2
Computes elements A^n until the given sizevector_of_powers