Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/SPA_functions.R

Performs score test using saddlepoint approximation and prepares summary statistics for meta-analysis.

1 2 3 4 |

`genos` |
A vector or matrix containing the genotypes or dosages. If matrix is provided then rows should correspond to SNPs and columns should correspond to subjects. Optional, but needed if |

`pheno` |
A vector containing the outcomes (phenotypes). Optional, but needed if |

`cov` |
A matrix or data frame containing the covariates. Optional, but needed if |

`obj.null` |
An object of class " |

`method` |
String specifying the p-value calculation method. Possible values are " |

`minmac` |
Minimum minor allele count threshold to run SPA test, default value is |

`Cutoff` |
An integer or the string "BE" denoting the standard deviation cutoff to be used. If |

`alpha` |
Significance level for the test(s), default value is |

`missing.id` |
Missing value indicator. Numeric or |

`beta.out` |
Logical indicating whether log odds ratios (beta parameters) are to be estimated, default value is |

`beta.Cutoff` |
Maximum p-value threshold for beta parameters to be estimated, default value is |

`output` |
String specifying the output required. Possible values are " |

`nodes.fixed` |
Vector denoting the spline nodes for the spline based summary statistics, if you do not want to provide a fixed set of nodes instead of estimating the optimal set of nodes. Only applicable when the output is " |

`nodes.init` |
Vector denoting the initial values of the spline nodes when you want to estimate the optimal set of spline nodes using the coordinate descent algorithm. Only applicable when the output is " |

`genos`

can have discrete `0, 1, 2`

values or continuous values between `[0,2]`

. The genotype or dosage values can represent any of the major allele, minor allele, reference allele or alternate allele counts (or dosages), as long as it is consistent throughout the subjects.

`genos`

can have missing values denoted by the `missing.id`

argument. Such missing values will be imputed using mean imputation. `pheno`

or `cov`

cannot have missing values.

`pheno`

and `cov`

are ignored if `obj.null`

is provided. If both `obj.null`

and `cov`

is missing, or `obj.null`

is missing and `cov=NULL`

, then the vector `rep(1,n)`

is assigned to `cov`

, where `n`

is the number of subjects.

`method`

= "SPA" is the basic saddlepoint approximation based test without the partially normal approximation improvement.
`method`

= "fastSPA" utilizes the partially normal approximation approach for improved efficiency, especially for rare variants.

Beta parameters are estimated using Firth's method, and thus computationally expensive. Therefore, it is recommended that beta parameters are only to be estimated when the p-value is very small (denoted by `beta.Cutoff`

). The code for beta estimation is as implemented by Clement Ma in the EPACTS software.

If `output`

= "P", the output will be the same as running `ScoreTest_SPA`

. No summary statistics for meta-analysis is provided.

If `output`

= "metaZ", the output will be the same as with `output`

= "P", except the p values in the output will be signed, and minor allele frequencies are also provided. This choice of `output`

provide required summary statistics for Z score-based meta-analysis.

If `output`

= "metaGC", the output will be the same as with `output`

= "P", except the p values in the output will be signed, and genotype counts of homozygous minor and heterozygous genotypes are also provided. This choice of `output`

provide required summary statistics for genotype count-based meta-analysis.

If `output`

= "metaspline", the output will be the same as with `output`

= "metaGC", additionally spline-based summary statistics are also provided. This choice of `output`

provide required summary statistics for spline-based as well as genotype count-based meta-analysis.

`p.value` |
p-value based on the saddlepoint approximation. If |

`p.value.NA` |
p-value based on the normal approximation (traditional score test). If |

`Is.converge` |
"TRUE" or "FALSE" denoting whether the root-finding algorithm for the saddlepoint equation has converged. |

`beta` |
Genotype log-odds ratio estimate. |

`SEbeta` |
Standard error for the genotype log-odds ratio. |

`MAF` |
Minor allele frequencies. Only provided when |

`GCmat` |
Genotype counts for homozygous minor (column 1) and heterozygous genotypes (column 2). Only provided when |

`spldata` |
Spline-based summary statistics on the CGF. Column 1 represents the raw score values, column 2 the variance of those scores, and the next columns represent nodes, first and second derivatives of the CGF in equal sizes. Only provided when |

Rounak Dey, deyrnk@umich.edu

Dey, R. et al., 2017. A Fast and Accurate Algorithm to Test for Binary Phenotypes and Its Application to PheWAS. The American Journal of Human Genetics, Vol 101 (1), 37-49.

Ma, C. et al., 2013. Recommended Joint and Meta-Analysis Strategies for Case-Control Association Testing of Single Low-Count Variants. Genetic Epidemiology, Vol 37 (6), 539-550.

`ScoreTest_wSaddleApprox_NULL_Model`

1 2 3 4 5 6 7 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.