Title: | Bayesian Model Selection for Generalized Linear Mixed Models |
---|---|
Description: | A Bayesian model selection approach for generalized linear mixed models. Currently, 'GLMMselect' can be used for Poisson GLMM and Bernoulli GLMM. 'GLMMselect' can select fixed effects and random effects simultaneously. Covariance structures for the random effects are a product of a unknown scalar and a known semi-positive definite matrix. 'GLMMselect' can be widely used in areas such as longitudinal studies, genome-wide association studies, and spatial statistics. 'GLMMselect' is based on Xu, Ferreira, Porter, and Franck (202X), Bayesian Model Selection Method for Generalized Linear Mixed Models, Biometrics, under review. |
Authors: | Shuangshuang Xu [aut, cre], Marco Ferreira [aut]
|
Maintainer: | Shuangshuang Xu <[email protected]> |
License: | GPL-3 |
Version: | 1.2.0 |
Built: | 2025-02-12 04:10:38 UTC |
Source: | https://github.com/cran/GLMMselect |
GLMMselect: Bayesian model selection method for generalized linear mixed models
GLMMselect( Y, X, Sigma, Z, family, prior, offset = NULL, NumofModel = 10, pip_fixed = 0.5, pip_random = 0.5 )
GLMMselect( Y, X, Sigma, Z, family, prior, offset = NULL, NumofModel = 10, pip_fixed = 0.5, pip_random = 0.5 )
Y |
A numeric vector of observations. |
X |
A matrix of covariates. |
Sigma |
A list of covariance matrices for random effects. |
Z |
A list of design matrices for random effects. |
family |
A description of the error distribution to be used in the model. |
prior |
The prior distribution for variance component of random effects. |
offset |
This can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of observations. |
NumofModel |
The number of models with the largest posterior probabilities being printed out. |
pip_fixed |
The cutoff that if the posterior inclusion probability of fixed effects is larger than it, the fixed effects will be included in the best model. |
pip_random |
The cutoff that if the posterior inclusion probability of random effects is larger than it, the random effects will be included in the best model. |
A list of the indices of covariates and random effects which are in the best model.
library(GLMMselect) data("Y");data("X");data("Z");data("Sigma") Model_selection_output <- GLMMselect(Y=Y, X=X, Sigma=Sigma, Z=Z, family="poisson", prior="AR", offset=NULL)
library(GLMMselect) data("Y");data("X");data("Z");data("Sigma") Model_selection_output <- GLMMselect(Y=Y, X=X, Sigma=Sigma, Z=Z, family="poisson", prior="AR", offset=NULL)
The expected number of lip cancer cases in each Scotland county between 1975 and 1980.
lipcancer_offset
lipcancer_offset
lipcancer_offset
A vector
This is a list of two covariance matrices for two types of random effects. The first component is for spatial random effects. The second componet is for overdispersion random effects.
lipcancer_Sigma
lipcancer_Sigma
lipcancer_Sigma
A list of covariance matrices for random effects.
This is a matrix with one candidate covariates, which is the proportion of population engaged in agriculture, fishing, or forestry.
lipcancer_X
lipcancer_X
lipcancer_X
A matrix with 56 observations and 1 covariate.
The observations about the observed number of lip cancer cases in each Scotland county between 1975 and 1980.
lipcancer_Y
lipcancer_Y
lipcancer_Y
A vector with 56 observations.
This is a list of two design matrices for two types of random effects. The first component is for spatial random effects. The second componet is for overdispersion random effects.
lipcancer_Z
lipcancer_Z
lipcancer_Z
A list of design matrices for random effects.
This is a list of two covariance matrices for two types of random effects. The first component is for spatial random effects. The second componet is for overdispersion random effects.
Sigma
Sigma
Sigma
A list of covariance matrices for random effects.
This is a matrix with four candidate covariates. The covariates in the first two columns are in the true model.
X
X
X
A matrix with 100 observations and 4 covariates.
The data was simulated under a Poisson Generalized linear mixed model with four candidate covariates, a vector of spatial random effects, and a vector of overdispersion random effects. The matrix of candidate covariates, the design matrices for two types of random effects, and the covariance matrices for two types of random effects are provide in the package.
Y
Y
Y
A vector with 100 observations.
This is a list of two design matrices for two types of random effects. The first component is for spatial random effects. The second componet is for overdispersion random effects.
Z
Z
Z
A list of design matrices for random effects.