get_mean_sd_error_anc: Get summary statistics on errors for markers with a certain...

Description Usage Arguments Value Author(s) Examples

Description

For each (min_bin, max_bin] allele frequency bin i.e. (0,0.2], (0.2, 0.4], (0.4, 0.6], (0.6, 0.8], and (0.8, 1.0], get mean and SD of errors (where error = estimated allele 1 frequency - true allele 1 frequency) for markers with a certain ancestry's true allele 1 frequency in the bin.

Usage

1
get_mean_sd_error_anc(ancestry, estimates, truth)

Arguments

ancestry

Ancestry i.e. ancestral population, coded 0, 1, or 2

estimates

Estimated allele frequencies

Rows: Markers

Columns: 1) Marker ID, 2-4) Ancestry-specific allele 1 frequency estimates for ancestries 0, 1, and 2

truth

True allele frequencies.

Rows: Markers

Columns: 1) Marker ID, 2-4) Ancestry-specific allele 1 frequency true values for ancestries 0, 1, and 2

Value

out

A 2 x 5 matrix with

Rows: (1) mean of errors, (2) sd of errors

Cols: True ancestry-specific allele 1 frequency bins (0,0.2], (0.2, 0.4], (0.4, 0.6], (0.6, 0.8], (0.8,1.0]

Author(s)

Qian Zhang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Simulated ancestries for 56,003 markers
# Rows: 56,003 markers
# Columns: 1) Marker ID, 2-4) Ancestry 0, 1, 2 allele 1 frequency estimates
dim(adm_estimates)

# ancestral_freqs
# Rows: 56,003 Markers
# Columns: 1) Marker ID,
# 2-4) Ancestry 0, 1, 2 allele 1 frequency true values
dim(ancestral_freqs)

# Mean and SD of errors for markers with
# true ancestry 0 allele 1 frequency in bins
# (0, 0.2], (0.2, 0.4], (0.4, 0.6], (0.6, 0.8], (0.8, 1.0].

get_mean_sd_error_anc(ancestry = 0, estimates = adm_estimates, truth = ancestral_freqs)

BiostatQian/ASAFE documentation built on May 6, 2019, 7:56 a.m.