LRTSim(RLRsim)
LRTSim()所属R语言包:RLRsim
Simulation of the (Restricted) Likelihood Ratio Statistic
(限制)似然比统计量的数值模拟
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions simulate values from the (exact) finite sample distribution of the (restricted) likelihood ratio statistic for testing the presence of the variance component (and restrictions of the fixed effects) in a simple linear mixed model with known correlation structure of the random effect and i.i.d. errors. They are usually called by
这些功能模拟值(精确)有限样本分布的似然比统计量(限制)用于测试一个简单的线性混合模型与已知的相关结构的随机效应的方差分量的固定效应(和限制)和IID错误。他们通常被称为由
用法----------Usage----------
LRTSim(X, Z, q, sqrt.Sigma, seed = NA, nsim = 10000, log.grid.hi = 8,
log.grid.lo=-10, gridlength=200)
RLRTSim(X, Z, qrX, sqrt.Sigma, lambda0 = NA, seed = NA, nsim = 10000, use.approx=0,
log.grid.hi=8, log.grid.lo=-10, gridlength=200)
参数----------Arguments----------
参数:X
The fixed effects design matrix of the model under the alternative
根据替代固定效应的模型设计矩阵
参数:Z
The random effects design matrix of the model under the alternative
随机效应下的模型设计矩阵的替代
参数:qrX
The QR-decomposition of the fixed effects design matrix
固定效应设计矩阵的QR分解
参数:q
The number of parameters restrictions on the fixed effects (see Details)
固定效应的参数限制(见详情)
参数:sqrt.Sigma
The upper triangular cholesky factor of the correlation matrix of the random effect
的随机效应的相关矩阵的上三角乔里斯基因子
参数:lambda0
The value of the ratio of the variance of the random effect and the errors under the null
的值的方差的随机效应的比率和下空的错误
参数:seed
Specify a seed for set.seed
指定为set.seed种子
参数:nsim
Number of values to simulate
参数值的数量来模拟
参数:use.approx
If 0, the exact distribution is simulated. If between 0 and 1, only the largest eigenvalues whose sum represents at least use.approx*(sum of all eigenvalues) are used.
如果为0,具体的分布进行了模拟。如果0和1之间,只有最大的特征值,其总和代表至少use.approx*(所有特征值总和)使用。
参数:log.grid.hi
Lower value of the grid on the log scale. See Details
较低的值的log规模上的网格。查看详细资料
参数:log.grid.lo
Lower value of the grid on the log scale. See Details
较低的值的log规模上的网格。查看详细资料
参数:gridlength
Length of the grid for the grid search over lambda. See Details
长度为网格的网格搜索过的lambda。查看详细资料
Details
详细信息----------Details----------
The model under the alternative must be a linear mixed model y=X*beta+Z*b+epsilon with a single random effect b with known correlation structure Sigma and i.i.d errors. The simulated distribution of the likelihood ratio statistic was derived by Crainiceanu & Ruppert (2004). The simulation algorithm uses a gridsearch over a log-regular grid of values of lambda=Var(b)/Var(epsilon) to maximize the likelihood under the alternative for nsim realizations of y drawn under the null hypothesis. log.grid.hi and log.grid.lo are the lower and upper limits of this grid on the log scale. gridlength is the number of points on the grid.\ These are just wrapper functions for the underlying C code.
替代的模式下必须有一个线性混合模型y=X*beta+Z*b+epsilon一个单一的随机效果b与已知的相关结构Sigma和独立同分布的误差。的似然比统计量来自由Crainiceanu&Ruppert公司(2004)的模拟分布。仿真算法在一个log规则的网格值的使用一个gridsearch的lambda=Var(b)/Var(epsilon)最大限度地替代的nsim实现的可能性y“”的零假设下得出。 log.grid.hi和log.grid.lo是该网格的上限和下限的log规模。 gridlength是网格点的数量。\这些都只是底层的C代码的包装功能。
值----------Value----------
A vector containig the the simulated values of the (R)LRT under the null,
一个向量containig空下的模拟值(R)轻铁,
(作者)----------Author(s)----------
Fabian Scheipl
参考文献----------References----------
Likelihood ratio tests in linear mixed models with one variance component, Journal of the Royal Statistical Society: Series B,66,165–185.
Testing for nonparametric terms and random effects in structured additive regression. Diploma thesis.\ http://www.statistik.lmu.de/~scheipl/downloads/DIPLOM.zip.
Size and power of tests for a zero random effect variance or polynomial regression in additive and linear mixed models, Computational Statistics & Data Analysis, 52(7):3283-3299
参见----------See Also----------
exactLRT, exactRLRT for tests
exactLRT,exactRLRT测试
实例----------Examples----------
library(lme4)
g <- rep(1:10, e = 10)
x <- rnorm(100)
y <- 0.1 * x + rnorm(100)
m <- lmer(y ~ x + (1|g), REML=FALSE)
m0 <- lm(y ~ 1)
(obs.LRT <- 2*(logLik(m)-logLik(m0)))
X <- m@X
Z <- t(as.matrix(m@Zt))
sim.LRT <- LRTSim(X, Z, 1, diag(10))
(pval <- mean(sim.LRT > obs.LRT))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|