jackVar: A jackknife method to compute the uncertainty of heteroplasmy...

View source: R/jackVar.R

jackVarR Documentation

A jackknife method to compute the uncertainty of heteroplasmy data

Description

Similarly to the main bootstrapVar function that implements the bootstrap method to measure the standard error of the variance, the jackknife technique is another resampling method that can be used for the same purpose. Unlike bootstrapVar, jackVar (and every jackknife-like method) is deterministic and does not rely on randomness, but instead it uses removals of the sample points, one each time to calculate different sub-samples of size (n-1). Note that the size of the input data should be strictly greater than 1.

Usage

jackVar(data)

Arguments

data

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

Value

The analytically derived standard error of the variance of data and the mean of the bootsrap samples means..

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)
jackVar(data)

mouseData=readHeteroplasmyData("HB")
mouseData1 = mouseData[which(!is.na(mouseData[,1])),1]
jackVar(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
bootstrapVar(mouseData[,3])
## Not run: 
#input data of size 1 will fail
data_ex=rnorm(1,0.5,0.1)
jackVar(data)

## End(Not run)

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