score.cpp: Calculte -log10(p) by score test (slow, for general cases)

View source: R/EMM_functions_cpp.R

score.cppR Documentation

Calculte -log10(p) by score test (slow, for general cases)

Description

Calculte -log10(p) by score test (slow, for general cases)

Usage

score.cpp(y, Gs, Gu, Ge, P0, chi0.mixture = 0.5)

Arguments

y

A n \times 1 vector. A vector of phenotypic values should be used. NA is allowed.

Gs

A list of kernel matrices you want to test. For example, Gs = list(A.part = K.A.part, D.part = K.D.part)

Gu

A n \times n matrix. You should assign ZKZ', where K is covariance (relationship) matrix and Z is its design matrix.

Ge

A n \times n matrix. You should assign identity matrix I (diag(n)).

P0

A n \times n matrix. The Moore-Penrose generalized inverse of SV0S, where S = X(X'X)^{-1}X' and V0 = \sigma^2_u Gu + \sigma^2_e Ge. \sigma^2_u and \sigma^2_e are estimators of the null model.

chi0.mixture

RAINBOW assumes the test statistic l1' F l1 is considered to follow a x chisq(df = 0) + (1 - a) x chisq(df = r). where l1 is the first derivative of the log-likelihood and F is the Fisher information. And r is the degree of freedom. The argument chi0.mixture is a (0 <= a < 1), and default is 0.5.

Value

-log10(p) calculated by score test


RAINBOWR documentation built on July 4, 2024, 1:11 a.m.