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.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(lfa)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/lfa/model.gof.Rd_%03d_medium.png", width=480, height=480)
> ### Name: model.gof
> ### Title: LFA model goodness of fit
> ### Aliases: model.gof
>
> ### ** Examples
>
> 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)
>
>
>
>
>
> dev.off()
null device
1
>