Learn R Programming

CHAPGWAS (version 0.1.3)

RANDOM: RANDOM: Mixed model and haplotype random effect test

Description

Internal core function used in SEL.HAP() to fit mixed models and test the random effect of a haplotype design matrix z.

Usage

RANDOM(z, YFIX, KIN, PAR)

Value

If PAR is NULL, returns the estimated parameters (vector). Otherwise returns a list with likelihood ratio test statistics and parameter estimates.

Arguments

z

Haplotype design matrix (n x r). When PAR is NULL, z can be NULL and the function only estimates variance components in the mixed model.

YFIX

A data.frame or matrix with phenotype in the first column and fixed-effect covariates in the remaining columns.

KIN

A list of kinship matrices.

PAR

Optional vector of (log) variance components. If NULL, they are estimated by the internal mixed model.