envr: Simulation variable storage environment

envrR Documentation

Simulation variable storage environment

Description

envr is a new (initially empty) environment that is created when HACSim is loaded.

Value

When a simulation is run via HAC.simrep, envr will contain 26 elements as follows:

ci.type

Type of confidence interval to compute and plot. Default is conf.type = "quantile".

conf.level

The desired confidence level. Default is conf.level = 0.95.

d

A dataframe with Nstar - X rows and five columns: specimens (specs), accumulated haplotypes (means), standard deviations (sds) and quantiles (both lower and upper)

df.out

A dataframe with iters rows and six columns displaying "Measures of Sampling Closeness".

filename

The name of the file where results are to be saved. Default is NULL.

Hstar

Number of unique species' haplotypes

input.seqs

Should DNA sequences be inputted? Default is FALSE.

iters

The number of iterations required to reach convergence

N

The starting sample size used to initialize the algorithm

Nstar

The final (extrapolated) sample size

Nstar.high

The upper endpoint of the desired level confidence interval for the 'true' required sample size

Nstar.low

The lower endpoint of the desired level confidence interval for the 'true' required sample size

num.iters

Number of iterations to compute. num.iters = NULL by default (i.e., all iterations are computed; users can specify num.iters = 1 for the first iteration.)

p

The user-specified level of haplotype recovery. Default is p = 0.95.

perms

The user-specified number of permutations (replications). Default is perms = 10000.

probs

Haplotype frequency distribution vector

progress

Should iteration results be outputted to the console? Default is TRUE.

prop.haps

If subset.haps = TRUE, the user-specified proportion of haplotype labels to recover

prop.seqs

If subset.seqs = TRUE, the user-specified proportion of DNA sequences to recover

ptm

A timer to track progress of the algorithm in seconds

R

The proportion of haplotypes recovered by the algorithm

R.low

The lower endpoint of the desired level confidence interval for the 'true' fraction of haplotypes captured

R.up

The upper endpoint of the desired level confidence interval for the 'true' fraction of haplotypes captured

subset.haps

Should a subsample of haplotype labels be taken? Default is FALSE.

subset.seqs

Should a subsample of DNA sequences be taken? Default is FALSE.

X

Mean number of specimens not sampled

Examples

# Returns the frequencies of each haplotype in the extrapolated sample 
max(envr$d$specs) * envr$probs

# Returns the extrapolated sample size corresponding to the dotted line 
# in the last iteration plot
envr$d[which(envr$d$means >= envr$p * envr$Hstar), ][1, 1]

HACSim documentation built on June 13, 2022, 9:05 a.m.