Generalized factor model is implemented for ultra-high dimensional data with mixed-type variables.
    Two algorithms, variational EM and alternate maximization, are designed to implement the generalized factor model,
    respectively. The factor matrix and loading matrix together with the number of factors can be well estimated. 
    This model can be employed in social and behavioral sciences, economy and finance, and  genomics, 
    to extract interpretable nonlinear factors. More details can be referred to 
    Wei Liu, Huazhen Lin, Shurong Zheng and Jin Liu. (2021) <doi:10.1080/01621459.2021.1999818>.

Download 'Google' fonts and generate 'CSS' to use in 'rmarkdown' documents and 
  'shiny' applications. Some popular fonts are included and ready to use.

Implements the non-iterative conditional expectation (NICE) 
    algorithm of the g-formula algorithm (Robins (1986) 
    <doi:10.1016/0270-0255(86)90088-6>, Hernán and Robins (2024, ISBN:9781420076165)). 
    The g-formula can estimate an outcome's counterfactual mean or risk under 
    hypothetical treatment strategies (interventions) when there is sufficient 
    information on time-varying treatments and confounders. 
    This package can be used for discrete or continuous time-varying treatments 
    and for failure time outcomes or continuous/binary end of follow-up 
    outcomes. The package can handle a random measurement/visit process and a 
    priori knowledge of the data structure, as well as censoring (e.g., by loss 
    to follow-up) and two options for handling competing events for failure time
    outcomes. Interventions can be flexibly specified, both as interventions on 
    a single treatment or as joint interventions on multiple treatments.
    See McGrath et al. (2020) <doi:10.1016/j.patter.2020.100008> for a guide on 
    how to use the package.

Implements the G-Formula method for causal inference with time-varying treatments and
  confounders using Bayesian multiple imputation methods, as described by
  Bartlett et al (2025) <doi:10.1177/09622802251316971>. It creates multiple synthetic imputed
  datasets under treatment regimes of interest using the 'mice' package. These can then be analysed
  using rules developed for analysing multiple synthetic datasets.