calculate_CI: Get confidence interval for ancestral or hidden states

calculate_CI_from_error_distributionR Documentation

Get confidence interval for ancestral or hidden states

Description

Calculate the confidence interval from the calculated posterior probability

Usage

calculate_CI_from_error_distribution(
  error,
  alpha = 0.05,
  tol = .Machine$double.eps^0.25
)

Arguments

error

a data frame listing the mean, variance and weight of normal distributions

alpha

the desired confidence level;default to 0.05

tol

the precision of calculated CI that is passed to uniroot with the same default

Details

calculate_CI_from_error_distribution calls uniroot function to find the CI at the desired confidence level.

For a mixture of normal distribution, the quantile at cumulative probability p Q_p will always be within the interval

min(Q_p_i),max(Q_p_i) where Q_p_i stands for the quantiles at cumulative probability p for each of the normal component.


wu-lab-uva/RasperGade documentation built on June 24, 2022, 2:47 p.m.