vcpen {vcpen}R Documentation

Penalized Variance Components

Description

Penalized Variance Component analysis

Usage

vcpen(
  y,
  X,
  Kerns,
  frac1 = 0.8,
  lambda_factor = NULL,
  lambda_grid = NULL,
  maxiter = 1000,
  vc_init = NULL,
  print_iter = FALSE
)

## S3 method for class 'vcpen'
summary(object, ..., digits = 4)

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.

frac1

Fraction of penalty imposed on L1 penalty, between 0 and 1 (0 for only L2; 1 for only L1 penalty).

lambda_factor

Weight for each vc (values between 0 and 1) for how much it should be penalized: 0 means no penalty. Default value of NULL implies weight of 1 for all vc's.

lambda_grid

Vector of lambda penalties for fitting the penalized model. Best to order values from largest to smallest so parameter estimates from a large penalty can be used as initial values for the next smaller penalty. Default value of NULL implies initial values of seq(from=.10, to=0, by=-0.01).

maxiter

Maximum number of iterations allowed during penalized fitting.

vc_init

Numeric vector of initial values for variance components. Default value of NULL implies initial values determined by 2 iterations of minque estimation.

print_iter

Logical: if TRUE, print the iteration results (mainly for refined checks)

object

Fitted vcpen object (used in summary method)

...

Optional arguments for summary method

digits

Signficant digits for summary method

Value

object with S3 class vcpen

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
fit  <- vcpen(response, covmat, Kerns, frac1 = .6)
summary(fit)


[Package vcpen version 1.9 Index]