null: Fitting the null model

Description Usage Arguments Details Value Examples

Description

Gives estimation of model parameters under the null hypothesis

Usage

1
2
null(formula, phenodata, kin = NULL, opt.method = 'optimize',
ih2 = 0.3, eps = 1.e-04)

Arguments

formula

referring to the column(s) in phenodata to be analyzed as outcome and, if needed, covariates.

phenodata

a data frame containing columns mentioned in formula: trait to analyze and, if needed, covariates. Individuals not measured for trait or covariates will be omitted.

kin

a square symmetric matrix giving the pairwise kinship coefficients between analyzed individuals. Under default kin = NULL all individuals will be considered as unrelated.

opt.method

optimization method, one of "optimize" (default), "optim" and "nlminb". Corresponding R functions will be used in optimization.

ih2

initial value for h2. Default = 0.3.

eps

epsilon (precision) value for optimization. Default = 1e-04.

Details

The function performs one-dimensional optimization for h2 with analytical calculations for the other parameters.

Value

A list with values:

h2

estimate of the heritability

total.var

estimate of the total variance

alpha

estimates of fixed effects of covariates

df

the gradient

logLH

the total log-likelihood

p.normality

p value of Shapiro-Wilk normality test for the null model residuals.

Examples

1
2
3
4
5
6
7
data(example.data)

## Run the null model:
nullmod <- null(trait ~ age + sex, phenodata, kin)

## SKAT with the null model object obtained in the first run:
out <- FFBSKAT(trait ~ age + sex, phenodata, genodata, kin, nullmod)

FREGAT documentation built on Jan. 15, 2018, 9:04 a.m.