Package: CausalMixGPD 0.8.0

Arnab Aich

CausalMixGPD: Bayesian Nonparametric Conditional Density Modeling in Causal Inference and Clustering with a Heavy-Tail Extension

The presence of a heavy tail is a feature of many scenarios when risk management involves extremely rare events. While parametric distributions may give adequate representation of the mode of data, they are likely to misrepresent heavy tails, and completely nonparametric approaches lack a rigorous mechanism for tail extrapolation; see Pickands (1975) <doi:10.1214/aos/1176343003>. The statistical methodology follows Aich and Bhattacharya (2026) <doi:10.5281/zenodo.19672760> for Bayesian analysis of heavy-tailed outcomes by combining Dirichlet process mixture models for the body of the distribution with optional generalized Pareto tails. The package implements for unconditional and covariate-modulated mixtures, implements MCMC estimation using 'nimble', and extends to mixtures of different arms' outcomes with application to causal inference in the Rubin (1974) <doi:10.1037/h0037350> framework. Posterior summaries include density functions, quantiles, expected values, survival functions, and causal effects, with an emphasis on tail quantiles and functional measures sensitive to the tail.

Authors:Arnab Aich [aut, cre]

CausalMixGPD_0.8.0.tar.gz
CausalMixGPD_0.8.0.zip(r-4.7)CausalMixGPD_0.8.0.zip(r-4.6)CausalMixGPD_0.8.0.zip(r-4.5)
CausalMixGPD_0.8.0.tgz(r-4.6-any)CausalMixGPD_0.8.0.tgz(r-4.5-any)
CausalMixGPD_0.8.0.tar.gz(r-4.7-any)CausalMixGPD_0.8.0.tar.gz(r-4.6-any)
CausalMixGPD_0.8.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
CausalMixGPD/json (API)

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

Bug tracker:https://github.com/arnabaich96/causalmixgpd/issues

Pkgdown/docs site:https://arnabaich96.github.io

Datasets:

On CRAN:

Conda:

4.67 score 1 stars 41 scripts 216 downloads 214 exports 26 dependencies

Last updated from:4c459f34ea. Checks:7 WARNING, 1 ERROR, 1 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING276
source / vignettesERROR247
linux-release-x86_64WARNING713
macos-release-arm64WARNING211
macos-oldrel-arm64WARNING150
windows-develWARNING232
windows-releaseWARNING246
windows-oldrelWARNING246
wasm-releaseOK174

Exports:ateate_rmeanattbuild_causal_bundlebuild_nimble_bundlebundlecatecheck_glue_validitycluster_profilescqtedamorosodAmorosodamorosogpddAmorosoGpddamorosomixdAmorosoMixdamorosomixgpddAmorosoMixGpddCauchydcauchy_vecdcauchymixdCauchyMixdgammagpddGammaGpddgammamixdGammaMixdgammamixgpddGammaMixGpddgpddGpddinvgaussdInvGaussdinvgaussgpddInvGaussGpddinvgaussmixdInvGaussMixdinvgaussmixgpddInvGaussMixGpddlaplacegpddLaplaceGpddlaplacemixdLaplaceMixdlaplacemixgpddLaplaceMixGpddlognormalgpddLognormalGpddlognormalmixdLognormalMixdlognormalmixgpddLognormalMixGpddnormgpddNormGpddnormmixdNormMixdnormmixgpddNormMixGpddpmgpddpmgpd.causaldpmgpd.clusterdpmixdpmix.causaldpmix.clusteress_summaryget_kernel_registryget_tail_registryinit_kernel_registrykernel_support_tablemcmcpamorosopAmorosopamorosogpdpAmorosoGpdpamorosomixpAmorosoMixpamorosomixgpdpAmorosoMixGpdparamspCauchypcauchy_vecpcauchymixpCauchyMixpgammagpdpGammaGpdpgammamixpGammaMixpgammamixgpdpGammaMixGpdpgpdpGpdpinvgausspInvGausspinvgaussgpdpInvGaussGpdpinvgaussmixpInvGaussMixpinvgaussmixgpdpInvGaussMixGpdplaplacegpdpLaplaceGpdplaplacemixpLaplaceMixplaplacemixgpdpLaplaceMixGpdplognormalgpdpLognormalGpdplognormalmixpLognormalMixplognormalmixgpdpLognormalMixGpdpnormgpdpNormGpdpnormmixpNormMixpnormmixgpdpNormMixGpdqamorosoqAmorosoqamorosogpdqAmorosoGpdqamorosomixqAmorosoMixqamorosomixgpdqAmorosoMixGpdqCauchyqcauchy_vecqcauchymixqCauchyMixqgammagpdqGammaGpdqgammamixqGammaMixqgammamixgpdqGammaMixGpdqgpdqGpdqinvgaussqInvGaussqinvgaussgpdqInvGaussGpdqinvgaussmixqInvGaussMixqinvgaussmixgpdqInvGaussMixGpdqlaplacegpdqLaplaceGpdqlaplacemixqLaplaceMixqlaplacemixgpdqLaplaceMixGpdqlognormalgpdqLognormalGpdqlognormalmixqLognormalMixqlognormalmixgpdqLognormalMixGpdqnormgpdqNormGpdqnormmixqNormMixqnormmixgpdqNormMixGpdqteqttramorosorAmorosoramorosogpdrAmorosoGpdramorosomixrAmorosoMixramorosomixgpdrAmorosoMixGpdrCauchyrcauchy_vecrcauchymixrCauchyMixrgammagpdrGammaGpdrgammamixrGammaMixrgammamixgpdrGammaMixGpdrgpdrGpdrinvgaussrInvGaussrinvgaussgpdrInvGaussGpdrinvgaussmixrInvGaussMixrinvgaussmixgpdrInvGaussMixGpdrlaplacegpdrLaplaceGpdrlaplacemixrLaplaceMixrlaplacemixgpdrLaplaceMixGpdrlognormalgpdrLognormalGpdrlognormalmixrLognormalMixrlognormalmixgpdrLognormalMixGpdrnormgpdrNormGpdrnormmixrNormMixrnormmixgpdrNormMixGpdrun_mcmc_bundle_manualrun_mcmc_causalsim_bulk_tailsim_causal_qtesim_survival_tail

Dependencies:clicodacpp11farverggplot2gluegtableigraphisobandlabelinglatticelifecyclemagrittrMatrixnimblenumDerivpkgconfigpracmaR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Amoroso distributionamoroso dAmoroso pAmoroso qAmoroso rAmoroso
Amoroso with a GPD tailamoroso_gpd dAmorosoGpd pAmorosoGpd qAmorosoGpd rAmorosoGpd
Lowercase vectorized Amoroso distribution functionsamoroso_lowercase damorosogpd damorosomix damorosomixgpd pamorosogpd pamorosomix pamorosomixgpd qamorosogpd qamorosomix qamorosomixgpd ramorosogpd ramorosomix ramorosomixgpd
Amoroso mixture distributionamoroso_mix dAmorosoMix pAmorosoMix qAmorosoMix rAmorosoMix
Amoroso mixture with a GPD tailamoroso_mixgpd dAmorosoMixGpd pAmorosoMixGpd qAmorosoMixGpd rAmorosoMixGpd
Restricted-mean ATE helperate_rmean
Average treatment effects, marginal over the empirical covariate distributionate ate.causalmixgpd_causal_fit
Average treatment effects standardized to treated covariatesatt
Lowercase vectorized distribution functions (base kernels)base_lowercase damoroso dcauchy_vec dgpd dinvgauss pamoroso pcauchy_vec pgpd pinvgauss qamoroso qcauchy_vec qgpd qinvgauss ramoroso rcauchy_vec rgpd rinvgauss
Build a causal bundle (design + two outcome arms)build_causal_bundle
Build the explicit one-arm NIMBLE bundlebuild_nimble_bundle
Build the workflow bundle used by the package fittersbundle
Conditional average treatment effectscate cate.causalmixgpd_causal_fit
Cauchy distributioncauchy dCauchy pCauchy qCauchy rCauchy
Cauchy mixture distributioncauchy_mix dCauchyMix pCauchyMix qCauchyMix rCauchyMix
Lowercase vectorized Cauchy mixture distribution functionscauchy_mix_lowercase dcauchymix pcauchymix qcauchymix rcauchymix
Alternative Positive-Support Causal Data Set With Three Predictorscausal_alt_pos500_p3_k3
Alternative Positive-Support Tail Causal Data Set With Five Predictorscausal_alt_pos500_p5_k4_tail
Alternative Real-Line Causal Data Set With Four Predictorscausal_alt_real500_p4_k2
Positive-Support Causal Data Set With Three Predictorscausal_pos500_p3_k2
Validate bulk+tail glue for MixGPD predictive distributioncheck_glue_validity
Extract Cluster Profilescluster_profiles
Conditional quantile treatment effectscqte cqte.causalmixgpd_causal_fit
Fit a one-arm Dirichlet process mixture with a spliced GPD taildpmgpd
Fit a causal two-arm Dirichlet process mixture with a spliced GPD taildpmgpd.causal
Fit a clustering-only bulk-tail modeldpmgpd.cluster
Fit a one-arm Dirichlet process mixture without a GPD taildpmix
Fit a causal two-arm Dirichlet process mixture without a GPD taildpmix.causal
Fit a clustering-only bulk modeldpmix.cluster
Effective sample size summaries for fitted modelsess_summary
Fitted values on the training designfitted.mixgpd_fit
Gamma with a GPD taildGammaGpd gamma_gpd pGammaGpd qGammaGpd rGammaGpd
Lowercase vectorized gamma distribution functionsdgammagpd dgammamix dgammamixgpd gamma_lowercase pgammagpd pgammamix pgammamixgpd qgammagpd qgammamix qgammamixgpd rgammagpd rgammamix rgammamixgpd
Gamma mixture distributiondGammaMix gamma_mix pGammaMix qGammaMix rGammaMix
Gamma mixture with a GPD taildGammaMixGpd gamma_mixgpd pGammaMixGpd qGammaMixGpd rGammaMixGpd
Get kernel registryget_kernel_registry
Get tail registryget_tail_registry
Generalized Pareto distributiondGpd gpd pGpd qGpd rGpd
Initialize kernel registriesinit_kernel_registry
Inverse Gaussian (Wald) distributiondInvGauss InvGauss pInvGauss qInvGauss rInvGauss
Inverse Gaussian with a GPD taildInvGaussGpd InvGauss_gpd pInvGaussGpd qInvGaussGpd rInvGaussGpd
Lowercase vectorized inverse Gaussian distribution functionsdinvgaussgpd dinvgaussmix dinvgaussmixgpd invgauss_lowercase pinvgaussgpd pinvgaussmix pinvgaussmixgpd qinvgaussgpd qinvgaussmix qinvgaussmixgpd rinvgaussgpd rinvgaussmix rinvgaussmixgpd
Inverse Gaussian mixture distributiondInvGaussMix InvGauss_mix pInvGaussMix qInvGaussMix rInvGaussMix
Inverse Gaussian mixture with a GPD taildInvGaussMixGpd InvGauss_mixgpd pInvGaussMixGpd qInvGaussMixGpd rInvGaussMixGpd
Kernel support matrixkernel_support_table
Laplace with a GPD taildLaplaceGpd laplace_gpd pLaplaceGpd qLaplaceGpd rLaplaceGpd
Lowercase vectorized Laplace distribution functionsdlaplacegpd dlaplacemix dlaplacemixgpd laplace_lowercase plaplacegpd plaplacemix plaplacemixgpd qlaplacegpd qlaplacemix qlaplacemixgpd rlaplacegpd rlaplacemix rlaplacemixgpd
Laplace (double exponential) mixture distributiondLaplaceMix laplace_mix pLaplaceMix qLaplaceMix rLaplaceMix
Laplace mixture with a GPD taildLaplaceMixGpd laplace_MixGpd pLaplaceMixGpd qLaplaceMixGpd rLaplaceMixGpd
Lognormal with a GPD taildLognormalGpd lognormal_gpd pLognormalGpd qLognormalGpd rLognormalGpd
Lowercase vectorized lognormal distribution functionsdlognormalgpd dlognormalmix dlognormalmixgpd lognormal_lowercase plognormalgpd plognormalmix plognormalmixgpd qlognormalgpd qlognormalmix qlognormalmixgpd rlognormalgpd rlognormalmix rlognormalmixgpd
Lognormal mixture distributiondLognormalMix lognormal_mix pLognormalMix qLognormalMix rLognormalMix
Lognormal mixture with a GPD taildLognormalMixGpd lognormal_mixgpd pLognormalMixGpd qLognormalMixGpd rLognormalMixGpd
Run posterior sampling from a prepared bundlemcmc
Positive-Support Tail Data Set With Four Componentsnc_pos_tail200_k4
Positive-Support Bulk-Only Data Set With Three Componentsnc_pos200_k3
Positive-Support Covariate Data Set With Three Predictorsnc_posX100_p3_k2
Positive-Support Covariate Data Set With Four Predictorsnc_posX100_p4_k3
Positive-Support Covariate Data Set With Five Predictorsnc_posX100_p5_k4
Real-Line Bulk-Only Data Set With Two Componentsnc_real200_k2
Real-Line Covariate Data Set With Three Predictorsnc_realX100_p3_k2
Real-Line Covariate Data Set With Five Predictorsnc_realX100_p5_k3
Normal with a GPD taildNormGpd normal_gpd pNormGpd qNormGpd rNormGpd
Lowercase vectorized normal distribution functionsdnormgpd dnormmix dnormmixgpd normal_lowercase pnormgpd pnormmix pnormmixgpd qnormgpd qnormmix qnormmixgpd rnormgpd rnormmix rnormmixgpd
Normal mixture distributiondNormMix normal_mix pNormMix qNormMix rNormMix
Normal mixture with a GPD taildNormMixGpd normal_mixgpd pNormMixGpd qNormMixGpd rNormMixGpd
Extract posterior mean parameters in natural shapeparams
Plot the treated and control outcome fits from a causal modelplot.causalmixgpd_causal_fit plot.mixgpd_fit plot.mixgpd_fitted
Plot QTE-style effect summariesplot.causalmixgpd_ate plot.causalmixgpd_qte
Plot a cluster bundleplot.dpmixgpd_cluster_bundle plot.dpmixgpd_cluster_fit plot.dpmixgpd_cluster_labels plot.dpmixgpd_cluster_psm
Plot prediction resultsplot.causalmixgpd_causal_predict plot.mixgpd_predict
Predict arm-specific and contrast-scale quantities from a causal fitpredict.causalmixgpd_causal_fit
Predict labels or similarity matrices from a cluster fitpredict.dpmixgpd_cluster_fit
Posterior predictive summaries from a fitted one-arm modelpredict.mixgpd_fit
Print an ATE-style effect objectprint.causalmixgpd_ate
Print a one-arm workflow bundleprint.causalmixgpd_bundle
Print a causal workflow bundleprint.causalmixgpd_causal_bundle
Print a fitted causal modelprint.causalmixgpd_causal_fit
Print method for paired causal-fit diagnostic plotsprint.causalmixgpd_causal_fit_plots
Print method for causal prediction plotsprint.causalmixgpd_causal_predict_plots
Print a propensity score bundleprint.causalmixgpd_ps_bundle
Print a propensity score fitprint.causalmixgpd_ps_fit
Print a QTE-style effect objectprint.causalmixgpd_qte
Print a cluster bundleprint.dpmixgpd_cluster_bundle
Print a cluster fitprint.dpmixgpd_cluster_fit
Print cluster labelsprint.dpmixgpd_cluster_labels
Print a cluster posterior similarity matrixprint.dpmixgpd_cluster_psm
Print a one-arm fitted modelprint.mixgpd_fit
Print method for mixgpd_fit diagnostic plotsprint.mixgpd_fit_plots
Print method for fitted value plotsprint.mixgpd_fitted_plots
Print Prediction Resultsprint.mixgpd_predict
Print method for prediction plotsprint.mixgpd_predict_plots
Print a MixGPD summary objectprint.mixgpd_summary
Print an ATE summaryprint.summary.causalmixgpd_ate
Print a causal-model summary objectprint.summary.causalmixgpd_causal_fit
Print a propensity-score summary objectprint.summary.causalmixgpd_ps_fit
Print a QTE summaryprint.summary.causalmixgpd_qte
Quantile treatment effects, marginal over the empirical covariate distributionqte qte.causalmixgpd_causal_fit
Quantile treatment effects standardized to treated covariatesqtt
Residual diagnostics on the training designresiduals.mixgpd_fit
Run posterior sampling for a prepared one-arm bundlerun_mcmc_bundle_manual
Run posterior sampling for a causal bundlerun_mcmc_causal
Simulate positive bulk-tail datasim_bulk_tail
Simulate causal quantile-treatment-effect datasim_causal_qte
Simulate censored survival-style tail datasim_survival_tail
Summarize an ATE-style effect objectsummary.causalmixgpd_ate
Summarize a one-arm workflow bundlesummary.causalmixgpd_bundle
Summarize a causal workflow bundlesummary.causalmixgpd_causal_bundle
Summarize a fitted causal modelsummary.causalmixgpd_causal_fit
Summarize a propensity score fitsummary.causalmixgpd_ps_fit
Summarize a QTE-style effect objectsummary.causalmixgpd_qte
Summarize a cluster bundlesummary.dpmixgpd_cluster_bundle
Summarize a cluster fitsummary.dpmixgpd_cluster_fit
Summarize cluster labelssummary.dpmixgpd_cluster_labels
Summarize a cluster posterior similarity matrixsummary.dpmixgpd_cluster_psm
Summarize posterior draws from a one-arm fitted modelsummary.mixgpd_fit