Learn R Programming

⚠️There's a newer version (1.1.0) of this package.Take me there.

This package implements a Bayesian profile regression using a generalized linear mixed model as output model. The package allows for binary (probit mixed model) and continuous (linear mixed model) outcomes and both continuous and categorical clustering variables. The package utilizes 'RcppArmadillo' and 'RcppDist' for high-performance statistical computing in C++.

Aspirational CRAN Installation Once accepted to CRAN, you will be able to install the stable version directly using the following command:

install.packages("ProfileGLMM")

The primary function for sampling form the posterior of the parameters is profileGLMM_Gibbs()

data("exposure_data")
exp_data = exposure_data$df

covList = {}
covList$FE = c('X')
covList$RE = c('t')
covList$REunit = c('indiv')
covList$Lat = c('X')
covList$Assign$Cont = c('Exp1','Exp2')
covList$Assign$Cat = NULL
covList$Y = c('Y')
dataProfile = profileGLMM_preprocess(regtype='linear',
                                     covList = covList,
                                     dataframe = exp_data,
                                     nC = 30,
                                     intercept = list(FE = T, RE = F, Lat = T))


MCMC_Obj = profileGLMM_Gibbs(model = dataProfile,
                             nIt = 5000,
                             nBurnIn = 2000)

Copy Link

Version

Install

install.packages('ProfileGLMM')

Monthly Downloads

207

Version

1.0.2

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Matteo Amestoy

Last Published

December 18th, 2025

Functions in ProfileGLMM (1.0.2)

theta_init

Initialize the variables for the Gibbs sampler chain
piecewise_data

Simulated Data and Parameters for a Piecewise Example
encodeCat

One-Hot Encodes Factor Variables (FIRST Level as Reference)
profileGLMM_postProcess

Post-process the MCMC chain from profileGLMM_Gibbs
profileGLMM_preprocess

Preprocess the data from a list describing the profile LMM model
profileGLMM_Gibbs

R Wrapper for Profile GLMM Gibbs Sampler (C++ backend)
prior_init

Initialize the prior hyperparameters for the Profile GLMM
profileGLMM_predict

Prediction of cluster memberships and outcomes
examp

List of the different outputs of the main function for examples
exposure_data

Simulated Data and Parameters for a exposure profile linear mixed model