model.gof: LFA model goodness of fit

Description Usage Arguments Details Value Note Examples

View source: R/lfa.R

Description

LFA model goodness of fit

Usage

1
model.gof(X, LF, B)

Arguments

X

a matrix of SNP genotypes, i.e. an integer matrix of 0's, 1's, and 2's. Sparse matrices of class Matrix are not supported (yet).

LF

matrix of logistic factors

B

number of null datasets to generate - B=1 is usualy sufficient. If computational time/power allows, a few extra B could be helpful

Details

This function returns p-values for LFA model goodness of fit based on a simulated null.

Value

vector of p-values for each SNP.

Note

Genotype matrix is expected to be a matrix of integers with values 0, 1, and 2. Currently no support for missing values. Note that the coding of the SNPs does not affect the algorithm.

Examples

1
2
3
4
5
6
LF = lfa(hgdp_subset, 4)
gof_4 = model.gof(hgdp_subset, LF, 3)
LF = lfa(hgdp_subset, 10)
gof_10 = model.gof(hgdp_subset, LF, 3)
hist(gof_4)
hist(gof_10)

Bioconductor-mirror/lfa documentation built on June 1, 2017, 10:49 a.m.