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。我们采用R内的面向对象类系统来提供对多种协方差和均值函数的方法,包括但不限于集群随机试验、队列研究,空间和时空建模以及分割区域设计。该类可生成相关矩阵和统计数据以及广泛的方法,包括使用马尔科夫链蒙特卡洛最大似然、拉普拉斯近似、功率计算和相关计算的广义线性混合模型完全似然估计。该类还包括随机效应的哈密顿蒙特卡洛模拟、稀疏矩阵方法和其他支持高效估计的功能。glmmrOptim包实现了一组算法来识别c-最优实验设计,其中观测值是相关的,并且可以使用广义线性混合模型来指定。提供了几个示例和与现有软件包的比较以说明如何使用这些包。