pseudovalidation: Performs 'pseudovalidation' to select the best lambda value...

View source: R/pseudovalidation.R

pseudovalidationR Documentation

Performs ‘pseudovalidation’ to select the best \lambda value in lassosum

Description

Performs ‘pseudovalidation’ to select the best \lambda value in lassosum

Usage

pseudovalidation(
  bfile,
  beta,
  cor,
  sd = NULL,
  keep = NULL,
  extract = NULL,
  exclude = NULL,
  remove = NULL,
  chr = NULL,
  cluster = NULL,
  ...
)

Arguments

bfile

A plink bfile stem

beta

The matrix of estimated \betas

cor

The vector of correlations (r)

sd

The standard deviation of the SNPs

keep

samples to keep

extract

SNPs to extract

exclude

SNPs to exclude

remove

samples to remove

chr

a vector of chromosomes

cluster

A cluster object from the parallel package for parallel computing

Details

A function to calculate

f(\lambda)=\beta'r/\sqrt{\beta'X'X\beta}

where X is the standardized genotype matrix divided by \sqrt n, and r is a vector of (shrunken) correlations.

Value

the results of the pseudovalidation, i.e. f(\lambda)

Note

  • Missing genotypes are interpreted as having the homozygous A2 alleles in the PLINK files (same as the --fill-missing-a2 option in PLINK).

  • The number of rows in beta and the length of cor should be the same as the number of SNPs in the bfile after extract/exclude/chr.


SeojinHwang/scadsum documentation built on June 30, 2023, 10:52 p.m.