# jaws.lfa: The Jackstraw Weighted Shrinkage Estimation Method for Sparse... In ncchung/jaws: Jackstraw Weighted Shrinkage Methods

## Description

Estimates sparse/shrunken coefficients (or loadings) of Logistic Factor Analysis (LFA). Based on statistical sginificance of association between variables (i.e., SNPs) and logistic factors (LFs), the conventional coefficients of LFs are shruken towards zeros, which improve its accuracy. The only required inputs are the data matrix `dat` and the number of LFs `r`.

## Usage

 ```1 2``` ```jaws.lfa(dat, p = NULL, r = NULL, s = NULL, B = NULL, verbose = TRUE, seed = NULL, save.all = FALSE) ```

## Arguments

 `dat` a data matrix with `m` rows as variables and `n` columns as observations. `p` `m*r` matrix of p-values obtained from running `jackstraw.LFA`. `r` a number (a positive integer) of significance logistic factors. `s` a number (a positive integer) of “synthetic” null variables (optional). `B` a number (a positive integer) of resampling iterations (optional). `verbose` a logical specifying to print the progress (default: TRUE). `seed` a seed for the random number generator (optional). `save.all` a logical specifying to save all objects, including a large SVD object (default: FALSE).

## Details

By default, `jaws.lfa` computes two canonical jackstraw weighted shrinkage estimators, namely `PIP` and `PNV`.

It is strongly advised that you take a careful look at your data and use appropriate graphical and statistical criteria to determine `r` (Note that `r` does not include an intercept term).

If `s` is not supplied, `s` is set to about 10% of `m` variables. If `B` is not supplied, `B` is set to `m*10/s`.

NOTE that you may input a `m*r` matrix of p-values obtained from running `jackstraw.LFA`.

## Value

`jaws.lfa` returns a list consisting of

 `p` p-values for association tests between variables and each of `r` logistic factors `pi0` proportion of variables not associated with `r` logistic factors, individually `PIP` a list of outputs derived from the posterior inclusion probabilities method (including `pr`, `coefs`, `af`, `r2`) `PNV` a list of outputs derived from the proportion of null variables method (including `pi0`, `coefs`, `af`, `r2`)

## Detailed explanation of the output contained in `PIP` and `PNV`

pr

a matrix of posterior inclusion probabilities (equivalent to 1-lfdr) for `m` coefficients and `r` LFs.

pi0

a vector of estimated proportion of null variables for `r` LFs.

coefs

a `m*r` matrix of shrunken coefficients.

af

a `m*n` matrix of shrunken allele frequencies.

r2

a vector of shrunken McFadden's pseudo R^2 measures for `r` LFs.

## Author(s)

Neo Chung [email protected]

## References

Chung and Storey (2015) Forthcoming