Learn R Programming

pooledpeaks (version 1.1.1)

EmpiricalSE: Calculate Empirical Standard Error

Description

This function calculates the empirical standard error based on repeated sampling.

Usage

EmpiricalSE(datafile = data.frame, NLoci = 10)

Value

A numeric vector containing the empirical standard error estimates.

Arguments

datafile

A data frame containing genetic data from the LoadData

NLoci

Number of loci to sample in each iteration.

Examples

Run this code

genetic_data <- data.frame(
Locus = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2),
Locus_allele = c("Marker1", "n", 1, 2, 3, "Marker2", "n", 1, 2, 3),
Sample1 = c(NA, 10, 0.5, 0.5, 0, NA, 10, 0.2, 0.3, 0.5),
Sample2 = c(NA, 20, 0.1, 0.2, 0.7, NA, 20, 0.3, 0.4, 0.3),
Sample3 = c(NA, 30, 0.3, 0.4, 0.3, NA, 30, 0.4, 0.2, 0.4)
)


EmpiricalSE(datafile=genetic_data, NLoci=3)

Run the code above in your browser using DataLab