Package: FactorHet 1.0.0

FactorHet: Estimate Heterogeneous Effects in Factorial Experiments Using Grouping and Sparsity

Estimates heterogeneous effects in factorial (and conjoint) models. The methodology employs a Bayesian finite mixture of regularized logistic regressions, where moderators can affect each observation's probability of group membership and a sparsity-inducing prior fuses together levels of each factor while respecting ANOVA-style sum-to-zero constraints. Goplerud, Imai, and Pashley (2024) <doi:10.48550/ARXIV.2201.01357> provide further details.

Authors:Max Goplerud [aut, cre], Nicole E. Pashley [aut], Kosuke Imai [aut]

FactorHet_1.0.0.tar.gz
FactorHet_1.0.0.zip(r-4.5)FactorHet_1.0.0.zip(r-4.4)FactorHet_1.0.0.zip(r-4.3)
FactorHet_1.0.0.tgz(r-4.4-x86_64)FactorHet_1.0.0.tgz(r-4.4-arm64)FactorHet_1.0.0.tgz(r-4.3-x86_64)FactorHet_1.0.0.tgz(r-4.3-arm64)
FactorHet_1.0.0.tar.gz(r-4.5-noble)FactorHet_1.0.0.tar.gz(r-4.4-noble)
FactorHet_1.0.0.tgz(r-4.4-emscripten)FactorHet_1.0.0.tgz(r-4.3-emscripten)
FactorHet.pdf |FactorHet.html
FactorHet/json (API)

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

Peer review:

Bug tracker:https://github.com/mgoplerud/factorhet/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

cpp

3.18 score 3 stars 1 scripts 22 exports 46 dependencies

Last updated 4 days agofrom:eaa6e84cb0. Checks:9 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKJan 14 2025
R-4.5-win-x86_64OKJan 14 2025
R-4.5-linux-x86_64OKJan 14 2025
R-4.4-win-x86_64OKJan 14 2025
R-4.4-mac-x86_64OKJan 14 2025
R-4.4-mac-aarch64OKJan 14 2025
R-4.3-win-x86_64OKJan 14 2025
R-4.3-mac-x86_64OKJan 14 2025
R-4.3-mac-aarch64OKJan 14 2025

Exports:ACEAMEAMIEcjoint_plotdiff_AMEFactorHetFactorHet_controlFactorHet_initFactorHet_mboFactorHet_mbo_controlFactorHet_refitHTE_by_individualHTE_by_moderatormanual_AMEmargeff_moderatorsmarginal_ACEmarginal_AMEmarginal_AMIEmoderator_AMEposterior_by_moderatorsposterior_FactorHetvisualize_MBO

Dependencies:backportsBBmisccheckmateclicolorspacedata.tablefansifarverfastmatchggplot2gluegtableisobandlabelinglatticelbfgslhslifecyclemagrittrMASSMatrixmgcvmlrmlrMBOmunsellnlmeparallelMapParamHelperspillarpkgconfigR6RColorBrewerRcppRcppArmadilloRcppEigenrlangscalessmoofstringisurvivaltibbleutf8vctrsviridisLitewithrXML

Readme and manuals

Help Manual

Help pageTopics
Calculate marginal effectsACE AME AMIE manual_AME
Plot a FactorHet objectcjoint_plot
Difference between AMEs in each groupdiff_AME
Estimate heterogeneous effects in factorial and conjoint experimentsFactorHet FactorHet_mbo
Control for FactorHet estimationFactorHet_control
Arguments for initializing FactorHetFactorHet_init
Control for model-based optimizationFactorHet_mbo_control
Refit model using estimated sparsity patternsFactorHet_refit
Generic methods for FactorHet modelsAIC.FactorHet BIC.FactorHet coef.FactorHet FactorHet-class formula.FactorHet logLik.FactorHet plot.FactorHet posterior_FactorHet print.FactorHet print.FactorHet_vis summary.FactorHet vcov.FactorHet visualize_MBO
Estimate heterogeneous treatment effects by individual or moderatorHTE HTE_by_individual HTE_by_moderator
Small dataset on immigration preferencesimmigration
Compute association between moderators and group membershipmargeff_moderators
Visualize the posterior by observed moderatorsposterior_by_moderators
Predict after using FactorHetpredict.FactorHet