Computing 

 
         Home     CV     Dissertation     Research    Teaching     Personal     Useful Links     Contact Info    

     Software on CRAN

  •  GLMMarp

            GLMMarp is an R package which contains functions to perform Bayesian inference using
            posterior simulation for the GLMM-AR(p) model. The GLMM-AR(p) model is a generalized
            linear multilevel model with a pth-order autoregressive error process, which is developed in
            my dissertation for analyzing discrete time-series cross-sectional data. The core function in
            GLMMarp conducts MCMC simulations and the Bayes factor calculation, and returns samples
            from parameter posteriors selected by the user. The function uses a hybrid sampler with the
            Gibbs, MH, and partial group move multigrid Monte Carlo algorithms. The computational    
            scheme for the Bayes factor is a modified Chib's approach (1995, 2001). GLMMarp also
            contains several useful functions, including independent functions for computing the Bayes
            factor with GLMM-AR(p) outputs, for recovering the random coefficients at the individual
            level, and doing within- and out-of-sample predictions with the posterior distributions. 

            The methods used in GLMMarp is based on Intertemporal and Contemporal Dependence in
             Binary Time-Series Cross-Sectional Data: Bayesian Hierarchical Model with AR(p) Errors
             and Non-nested Clustering,
and can be download here.

     R Code Available Upon Request 

  •  PARE(p) Model (Probit pth-Order Autoregressive Error Model) 

            This R package includes

             1, MCMC simulation function to estimate the proit model with autoregressive errors for
                
analyzing binary and ordinal time series responses by controlling serial correlation. 
                 
Download .tar.gz or .zip

             2, R code for calculating the Bayes Factor by using Particle Filter for model comparison
                 and lag order determination. Download .tar.ga or zip

             The associated article is Binary and ordinal Time Series with AR(p) Errors: Bayesian Model
             Determination for Latent High-Order Markovian Processes,
and can be download here.

  •    GLMM-AR(p) Multifactor Residual Model (GLMM-AR(p) Model with Time-Specific                      Unit-Varying Random Effects)
             This is an extension of the GLMM-AR(p) model above by allowing common shocks to have
             unit-specific effects, which is useful in IPE studies in the era of globalization.

             This R package includes

            
1. a file containing all the functions called in the MCMC algorithm. Users have to  first  call
                 this file in order to run the MCMC program below. Download .tar.gz or .zip

             2. R code of MCMC simulation to estimate GLMM models without limitation of lag orders:  
                 high-order autoregressive models are supported. Download .tar.gz or .zip

             3. R code to reaggrange the MCMC output, i.e., to compute the random effects.
                 Download
 .tar.gz or .zip

             4. R code to compute the Bayes Factor. Download .tar.ga or .zip

   
  •    Spike and Slab Model
             The Linear Spike and Slab Model

              Download .tar.ga or .zip. This R package uses the model based on:

              Ishwaran, H.,  and J. S. Rao, 2005, "Spike and Slab Variable Selection: Frequentist
              and Bayesian  Strategies",  The Annals of Statistics,  vol. 33, pp.730-773.

             The Generalized Spike and Slab Model

               This R package includes the probit and logistic spike and slab model.

               1, R package for estimating the probit spike and slab model. Download .tar.gz or .zip

               2,  
R package for estimating the logit spike and slab model. Download .tar.gz or .zip