minque {vcpen} | R Documentation |
MINQUE estimation of variance components
Description
Estimate variance components by MINQUE method, allowing multiple iterations
Usage
minque(y, X, Kerns, n.iter = 1, eps = 0.001)
Arguments
y |
Numeric vector of traits. Only continuous trait currently allowed. |
X |
Matrix of covariates (columns) for subjects (rows), matching subjects in the trait (y) vector. |
Kerns |
List of kernel matrices: a kernel matrix for each variance compenent. The last kernel matrix in the list (an identity matrix) is for the residual variance component. |
n.iter |
Number of minque iterations |
eps |
Default small positive value for non-positive vc estimates within iterations. |
Value
List with estimates of variance components (vc), covariate regression coefficients (beta), and residuals of model fit.
Author(s)
JP Sinnwell, DJ Schaid
Examples
data(vcexample)
nvc <- 1+length(unique(doseinfo[,2]))
id <- 1:nrow(dose)
## vcs for genetic kernel matrices
Kerns <- vector("list", length=nvc)
for(i in 1:(nvc-1)){
Kerns[[i]] <- kernel_linear(dose[,grep(i, doseinfo[,2])])
rownames(Kerns[[i]]) <- id
colnames(Kerns[[i]]) <- id
}
## vc for residual variance
Kerns[[nvc]] <- diag(nrow(dose))
rownames(Kerns[[nvc]]) <- id
colnames(Kerns[[nvc]]) <- id
prefit <- minque(response, covmat, Kerns, n.iter=2)
prefit[1]
prefit[2]
fit <- vcpen(response, covmat, Kerns, vc_init = prefit$vc)
[Package vcpen version 1.9 Index]