| Title: | Empirical Likelihood Inference of Variance Components in Linear Mixed-Effects Models |
|---|---|
| Description: | This package provides empirical likelihood-based methods for the inference of variance components in linear mixed-effects models. |
| Authors: | Jingru Zhang |
| Maintainer: | Jingru Zhang <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 0.1 |
| Built: | 2026-05-18 08:25:27 UTC |
| Source: | https://github.com/jingru-zhang/elmethod |
This is a p by T matrix. Each column is the fixed effects at time t.
This package provides empirical likelihood-based methods for the inference of variance components in linear mixed-effects models.
Jingru Zhang, Haochang Shou, Hongzhe Li
Maintainer: Jingru Zhang ([email protected])
Zhang J., Guo W., Carpenter J.S., Leroux A., Merikangas K.R., Martin N.G., Hickie I.B., Shou H., and Li H. (2022). Empirical likelihood tests for variance components in linear mixed-effects models.
This function provides an empirical likelihood method for the inference of a local variance component in linear mixed-effects models.
ELvar(X,Y,Philist,theta0=0,beta=NA,other=FALSE)ELvar(X,Y,Philist,theta0=0,beta=NA,other=FALSE)
X |
design matrix for all observations, in which each row represents a p-dimentional covariates. |
Y |
response vector. |
Philist |
list of design matrices of variance components. Its i-th element is an ni by ni*d matrix that combines design matrices of variance components by columns for the i-th subject. |
theta0 |
value of the first variance component under the null. Its default value is 0. |
beta |
fixed effects. Its default value is NA (unknown fixed effects). |
other |
logical; if TRUE, the function gives auxiliary terms. Its default value is FALSE. |
stat |
value of the test statistic. |
pvalue |
approximated p-value based on asymptotic theory. |
Zi, Di, Mi, nv1sq
|
auxiliary terms if other=TRUE. |
Zhang J., Guo W., Carpenter J.S., Leroux A., Merikangas K.R., Martin N.G., Hickie I.B., Shou H., and Li H. (2022). Empirical likelihood tests for variance components in linear mixed-effects models.
# Datasets "exampleNE0" and "exampleNE1" contain normal distributed longitudinal data. # Datasets "exampleTE0" and "exampleTE1" contain t distributed longitudinal data. # The fist variance components in the datasets "exampleNE0" and "exampleTE0" are zero. # The fist variance components in the datasets "exampleNE1" and "exampleTE1" are nonzero at the 24, 25, 26, 27 time points. # X is an N by p matrix with N being the number of all observations and p being the dimension of covariates. # Y.all is an N by T matrix with T being the number of time points. # Philist is an n list of design matrices of variance components with n being the number of subjects. Its $i$th element Philist[[i]] is an $n_i$ by $n_id$ matrix that combines design matrices of variance components by columns for the $i$th subject, where $n_i$ is the number of repeated measures for the $i$th subject and $d$ is the number of variance components. # beta.all is a p by T matrix. Each column is the fixed effects at time t. # thetastar is a d by T matrix. Each column is the variance components at time t. data(exampleNE0) t = 1 # consider the local problem at time t re = ELvar(X,Y.all[,t],Philist,theta0=0) # with unknown fixed effects re = ELvar(X,Y.all[,t],Philist,theta0=0,beta=beta.all[,t]) # with known fixed effects.# Datasets "exampleNE0" and "exampleNE1" contain normal distributed longitudinal data. # Datasets "exampleTE0" and "exampleTE1" contain t distributed longitudinal data. # The fist variance components in the datasets "exampleNE0" and "exampleTE0" are zero. # The fist variance components in the datasets "exampleNE1" and "exampleTE1" are nonzero at the 24, 25, 26, 27 time points. # X is an N by p matrix with N being the number of all observations and p being the dimension of covariates. # Y.all is an N by T matrix with T being the number of time points. # Philist is an n list of design matrices of variance components with n being the number of subjects. Its $i$th element Philist[[i]] is an $n_i$ by $n_id$ matrix that combines design matrices of variance components by columns for the $i$th subject, where $n_i$ is the number of repeated measures for the $i$th subject and $d$ is the number of variance components. # beta.all is a p by T matrix. Each column is the fixed effects at time t. # thetastar is a d by T matrix. Each column is the variance components at time t. data(exampleNE0) t = 1 # consider the local problem at time t re = ELvar(X,Y.all[,t],Philist,theta0=0) # with unknown fixed effects re = ELvar(X,Y.all[,t],Philist,theta0=0,beta=beta.all[,t]) # with known fixed effects.
This function provides an empirical likelihood method for the inference of variance components over an interval in linear mixed-effects models.
GELvar(X,Y.all,Philist,theta0=0,beta.all=NA,permnum=1e3)GELvar(X,Y.all,Philist,theta0=0,beta.all=NA,permnum=1e3)
X |
design matrix for all observations, in which each row represents a p-dimentional covariates. |
Y.all |
response matrix, in which each column is the response vector at time t. |
Philist |
list of design matrices of variance components. Its i-th element is an ni by d*ni matrix that combines design matrices of variance components by columns for the i-th subject, where ni is the number of repeated measures for the i-th subject and d is the number of variance components. |
theta0 |
value of the first variance component under the null. Its default value is 0. |
beta.all |
fixed effects. Each column is the fixed effects at time t. Its default value is NA (unknown fixed effects). |
permnum |
number of perturbation. Its default value is 1000. |
stat.global |
value of the test statistic over an interval. |
pvalue.global |
approximated p-value over an interval based on the perturbation. |
Zhang J., Guo W., Carpenter J.S., Leroux A., Merikangas K.R., Martin N.G., Hickie I.B., Shou H., and Li H. (2022). Empirical likelihood tests for variance components in linear mixed-effects models.
# Datasets "exampleNE0" and "exampleNE1" contain normal distributed longitudinal data. # Datasets "exampleTE0" and "exampleTE1" contain t distributed longitudinal data. # The fist variance components in the datasets "exampleNE0" and "exampleTE0" are zero. # The fist variance components in the datasets "exampleNE1" and "exampleTE1" are nonzero at the 24, 25, 26, 27 time points. # X is an N by p matrix with N being the number of all observations and p being the dimension of covariates. # Y.all is an N by T matrix with T being the number of time points. # Philist is an n list of design matrices of variance components with n being the number of subjects. Its $i$th element Philist[[i]] is an $n_i$ by $n_id$ matrix that combines design matrices of variance components by columns for the $i$th subject, where $n_i$ is the number of repeated measures for the $i$th subject and $d$ is the number of variance components. # beta.all is a p by T matrix. Each column is the fixed effects at time t. # thetastar is a d by T matrix. Each column is the variance components at time t. data(exampleNE0) re = GELvar(X,Y.all,Philist,theta0=0)# Datasets "exampleNE0" and "exampleNE1" contain normal distributed longitudinal data. # Datasets "exampleTE0" and "exampleTE1" contain t distributed longitudinal data. # The fist variance components in the datasets "exampleNE0" and "exampleTE0" are zero. # The fist variance components in the datasets "exampleNE1" and "exampleTE1" are nonzero at the 24, 25, 26, 27 time points. # X is an N by p matrix with N being the number of all observations and p being the dimension of covariates. # Y.all is an N by T matrix with T being the number of time points. # Philist is an n list of design matrices of variance components with n being the number of subjects. Its $i$th element Philist[[i]] is an $n_i$ by $n_id$ matrix that combines design matrices of variance components by columns for the $i$th subject, where $n_i$ is the number of repeated measures for the $i$th subject and $d$ is the number of variance components. # beta.all is a p by T matrix. Each column is the fixed effects at time t. # thetastar is a d by T matrix. Each column is the variance components at time t. data(exampleNE0) re = GELvar(X,Y.all,Philist,theta0=0)
This function provides an empirical likelihood method for the inference of variance components at multiple time points in linear mixed-effects models.
multiELvar(X,Y.all,Philist,theta0=0,beta.all=NA,other=FALSE)multiELvar(X,Y.all,Philist,theta0=0,beta.all=NA,other=FALSE)
X |
design matrix for all observations, in which each row represents a p-dimentional covariates. |
Y.all |
response matrix, in which each column is the response vector at time t. |
Philist |
list of design matrices of variance components. Its i-th element is an ni by d*ni matrix that combines design matrices of variance components by columns for the i-th subject, where ni is the number of repeated measures for the i-th subject and d is the number of variance components. |
theta0 |
value of the first variance component under the null. Its default value is 0. |
beta.all |
fixed effects. Each column is the fixed effects at time t. Its default value is NA (unknown fixed effects). |
other |
logical; if TRUE, the function gives auxiliary terms. Its default value is FALSE. |
stat.all |
vector of test statistics at multiple time points. |
pvalue.all |
vector of approximated p-value at multiple time points based on asymptotic theory. |
Z.all, D.all, M.all, nv1sq.all
|
auxiliary terms if other=TRUE. |
Zhang J., Guo W., Carpenter J.S., Leroux A., Merikangas K.R., Martin N.G., Hickie I.B., Shou H., and Li H. (2022). Empirical likelihood tests for variance components in linear mixed-effects models.
# Datasets "exampleNE0" and "exampleNE1" contain normal distributed longitudinal data. # Datasets "exampleTE0" and "exampleTE1" contain t distributed longitudinal data. # The fist variance components in the datasets "exampleNE0" and "exampleTE0" are zero. # The fist variance components in the datasets "exampleNE1" and "exampleTE1" are nonzero at the 24, 25, 26, 27 time points. # X is an N by p matrix with N being the number of all observations and p being the dimension of covariates. # Y.all is an N by T matrix with T being the number of time points. # Philist is an n list of design matrices of variance components with n being the number of subjects. Its $i$th element Philist[[i]] is an $n_i$ by $n_id$ matrix that combines design matrices of variance components by columns for the $i$th subject, where $n_i$ is the number of repeated measures for the $i$th subject and $d$ is the number of variance components. # beta.all is a p by T matrix. Each column is the fixed effects at time t. # thetastar is a d by T matrix. Each column is the variance components at time t. data(exampleNE0) re = multiELvar(X,Y.all,Philist,theta0=0)# Datasets "exampleNE0" and "exampleNE1" contain normal distributed longitudinal data. # Datasets "exampleTE0" and "exampleTE1" contain t distributed longitudinal data. # The fist variance components in the datasets "exampleNE0" and "exampleTE0" are zero. # The fist variance components in the datasets "exampleNE1" and "exampleTE1" are nonzero at the 24, 25, 26, 27 time points. # X is an N by p matrix with N being the number of all observations and p being the dimension of covariates. # Y.all is an N by T matrix with T being the number of time points. # Philist is an n list of design matrices of variance components with n being the number of subjects. Its $i$th element Philist[[i]] is an $n_i$ by $n_id$ matrix that combines design matrices of variance components by columns for the $i$th subject, where $n_i$ is the number of repeated measures for the $i$th subject and $d$ is the number of variance components. # beta.all is a p by T matrix. Each column is the fixed effects at time t. # thetastar is a d by T matrix. Each column is the variance components at time t. data(exampleNE0) re = multiELvar(X,Y.all,Philist,theta0=0)
This is a list of design matrices of variance components. Its i-th element is an ni by d*ni matrix that combines design matrices of variance components by columns for the i-th subject, where ni is the number of repeated measures for the i-th subject and d is the number of variance components.
This is a d by T matrix, where d is the number of variance components and T is the number of time points. Each column is the true variance components at time t.
This is an N by p matrix with N being the number of all observations and p being the dimension of covariates. Each row represents a p-dimentional covariates.
This is an N by T matrix with N being the number of all observations and T being the number of time points. Each column is the response vector at time t.