We describe the R package glmmrBase and an extension glmmrOptim. glmmrBase provides a flexible approach to specifying and analysing generalised linear mixed models. We use an object-orientated class system within R to provide methods for a wide range of covariance and mean functions relevant to multiple applications including cluster randomised trials, cohort studies, spatial and spatio-temporal modelling, and split-plot designs. The class generates relevant matrices and statistics and a wide range of methods including full likelihood estimation of generalised linear mixed models using Markov Chain Monte Carlo Maximum Likelihood, Laplace approximation, power calculation, and access to relevant calculations. The class also includes Hamiltonian Monte Carlo simulation of random effects, sparse matrix methods, and other functionality to support efficient estimation. The glmmrOptim package implements a set of algorithms to identify c-optimal experimental designs where observations are correlated and can be specified using a generalised linear mixed model. Several examples and comparisons to existing packages are provided to illustrate use of the packages.
翻译:我们介绍了R包glmmrBase及其扩展包glmmrOptim。glmmrBase提供了一种灵活的方法来指定和分析广义线性混合模型。我们在R中采用面向对象的类系统,为多种协方差和均值函数提供方法,这些函数适用于多种应用场景,包括整群随机试验、队列研究、空间和时空建模以及裂区设计。该类系统可生成相关矩阵和统计量,并提供广泛的方法,包括使用马尔可夫链蒙特卡洛最大似然法进行广义线性混合模型的完全似然估计、拉普拉斯近似、功效计算以及相关计算接口。该类系统还包括随机效应的哈密顿蒙特卡洛模拟、稀疏矩阵方法以及其他支持高效估计的功能。glmmrOptim包实现了一系列算法,用于识别在观测值相关且可通过广义线性混合模型指定的情况下的c-最优实验设计。我们提供了多个示例,并与现有包进行了比较,以说明这些包的用法。