analyticVarKimura: Kimura-based calculation of the standard error of the...

View source: R/analyticVarKimura.R

analyticVarKimuraR Documentation

Kimura-based calculation of the standard error of the variance

Description

A Kimura-distribution-based method that calculates analytically the standard error of the variance (see Eq. 11 in Wonnapinij et al., 2010). It uses only the Kimura distribution parameters p and b (passed as arguments).

Usage

analyticVarKimura(data, p, b)

Arguments

data

The input data in the form of a vector. NA values are omitted.

p

The p parameter of the Kimura distribution. Should be in [0,1].

b

The b parameter of of the Kimura distribution. Should be in [0,1].

Value

The analytically derived standard error of the variance of data.

Examples

# size of the sample
n=50
#generate a random sample of size n from a normal distribution
data_ex=rnorm(n,0.5,0.1)
analyticVar(data)

mouseData=readHeteroplasmyData("HB")
mouseData1 = mouseData[which(!is.na(mouseData[,1])),1]
analyticVar(mouseData1)

# use the package data and load it to variable mouseData
mouseData=mousedataLE
# calculate the standard error of the variance for the LE oocyte sample #3
analyticVarKimura(mouseData[,3])

kostasgian21/heteroplasmy documentation built on Jan. 30, 2024, 12:30 a.m.