ess: Compute the effective sample size for a LMM.

Description Usage Arguments Value Examples

View source: R/ess.R

Description

Compute the effective sample size for a LMM.

Usage

1
ess(G, cols = seq(ncol(G)), M = length(cols), h2, s2 = 1)

Arguments

G

A FBM matrix of genotypes. Missing values are not handled.

cols

A vector of columns of G to be used in the model. By default, all columns of G are used.

M

A scalar for normalization of the genetic relationship matrix: GRM = Z'Z / M, where Z is a matrix of standardized genotypes. By default, M = length(cols).

h2

The estimated heritability in the LMM.

s2

The estimated scaling constant for the variance components in the LMM.

Value

A data.frame of results.

Examples

1
2
3
4
5
6
7
G <- attach_example200()
G
G[1:5, 1:10]

ess(G, h2 = 0.5)

ess(G, h2 = 0.8)

variani/biglmmz documentation built on Dec. 15, 2020, 7:58 a.m.