CLME-package: Constrained inference for linear mixed models.
Description
Implements distribution-free bootstrap methodology to conduct constrained inference on linear mixed models. Covariates and random effects are permitted but not required (i.e. fixed-effects models can be run).
Appropriate credit should be given when publishing results obtained using CLME, or when developing other programs/packages based off of this one. The preferred citation is CITATION. Use citation(package="CLME")
for Bibtex information.Details
ll{
Package: CLME
Type: Package
Version: 1.0
Date: 2014-02-20
License: GLP-2 | GLP-3
}
This package implements the constrained linear mixed effects model described in Farnan, Ivanova, and Peddada (2014). See that paper for more details regarding the method. Here we give a brief overview of the model to define notation used throughout the manual:
$$Y = X_{1}\theta_{1} + X_{2}\theta_{2} + U\xi + \epsilon$$
where
- $X_1$is a$N \times p_1$design matrix.
- $\theta_1$are the coefficients (often treatment effects).
- $X_2$is a$N \times p_2$matrix of fixed covariates.
- $\theta_1$are the coefficients for the covariates.
- $U$is a$N \times c$matrix of random effects.
- $\xi$is a zero-mean random vector with covariance$T$(see below).
- $\epsilon$is a zero-mean random vector with covariance$\Sigma$(see below).
Neither covariates ($X_2$) nor random effects ($U$) are required by the model or CLME. The covariance matrix of $\xi$ is given by:
$$T = diag\left( \tau^{2}_{1}I_{c_{1}}, \tau^{2}_{2}I_{c_{2}} , \dots , \tau^{2}_{q}I_{c_{q}} \right)$$
The first $c_{1}$ random effects will share a common variance, $\tau^{2}_{1}$, the next $c_{2}$ random effects will share a common variance, and so on. Note that $c = \sum_{i=1}^{q} c_i$. Homogeneity of variances in the random effects can be induced by letting $q=1$ (hence $c_{1}=c=ncol(U)$).
Similarly, the covariance matrix of $\epsilon$ is given by:
$$\Sigma = diag\left( \sigma^{2}_{1}I_{n_{1}}, \sigma^{2}_{2}I_{n_{2}} , \dots , \sigma^{2}_{q}I_{n_{k}} \right)$$
Again, the first $n_{1}$ observations will share a common variance, $\sigma^{2}_{1}$, the next $n_{2}$ will share a common variance, and so on. Note that $N = \sum_{i=1}^{k} n_i$. Homogeneity of variances in the residuals can be induced by letting $k=1$.
The order constraints are defined by the matrix $A$. This is an $r \times p$ matrix where $r$ is the number of constraints, and $p=p_{1}+p_{2}$ is the dimension of $\theta = ( \theta_{1}' , \theta_{2}')'$. Formally the hypothesis being tested is:
$$H_{a}: A\theta > 0$$
For several default orders (simple, umbrella, simple tree) the $A$ matrix can be automatically generated. Alternatively, the user may define a custom $A$ matrix to test other patterns among the elements of $\theta$. See create.constraints
and constrained.lme
for more details.
The primary function of CLME is constrained.lme
. The other functions in this package may be run separately, but in general are designed for use by constrained.lme
.References
Farnan, L., Ivanova, A., and Peddada, S. D. (2014).
Linear Mixed Efects Models under Inequality Constraints with Applications.
PLOS ONE, 9(1). e84778. doi: 10.1371/journal.pone.0084778
http://www.plosone.org/article/info:doi/10.1371/journal.pone.0084778