get_cov_mle: Calculate the negative inverse hessian of the parameters from...

Description Usage Arguments Author(s)

View source: R/update_all.R

Description

This is the covariance matrix if evaluated at the MLE's of these parameters.

Usage

1
2
3
4
5
get_cov_mle(ocounts, osize, ploidy, prob_geno, bias_val, seq_error, od_param,
  out_prop, p1counts = NULL, p1size = NULL, p1geno = NULL,
  p2counts = NULL, p2size = NULL, p2geno = NULL, bias_val_mean = 0,
  bias_val_sd = 0.7, seq_error_mean = -4.7, seq_error_sd = 1,
  model = c("f1", "s1", "hw", "uniform"))

Arguments

ocounts

The observed counts of the refernce allele for each individual.

osize

The observed number of reads for each individuals.

ploidy

An integer. The ploidy of the species. This is assumed to be the same for each individual.

prob_geno

The allele frequencies of the genotypes. See get_prob_geno.

bias_val

The bias parameter. A value of 1 means there is no bias toward one allele or the other. A value less than one indicates a bias toward the reference allele. A value greater than one indicates a bias toward the non-reference allele.

seq_error

The sequencing error rate.

od_param

The overdispersion parameter in the beta-binomial model for the OK counts. When this is zero, this resorts to the binomial model for counts.

out_prop

The proportion of points that are outliers. Defaults (quite arbitrarily) to 0.01.

p1counts

A vector of non-negative integers. The ith element is the number of reads of the reference allele in the ith sample of parent 1. If NULL then the prior probabilities on parent 1's genotype will default to uniform.

p1size

A vector of positive integers. The ith element is the total number of reads in the ith sample of parent 1. If NULL then the prior probabilities on parent 1's genotype will default to uniform.

p1geno

The initial value of the first parental genotype.

p2counts

A vector of non-negative integers. The ith element is the number of reads of the reference allele in the ith sample of parent 2. If NULL then the prior probabilities on parent 2's genotype will default to uniform.

p2size

A vector of positive integers. The ith element is the total number of reads in the ith sample of parent 2. If NULL then the prior probabilities on parent 2's genotype will default to uniform.

p2geno

The initial value of the second parental genotype.

bias_val_mean

The prior mean on the log of bias_val (corresponding to parvec[1]). Set bias_val_sd = Inf to have no penalty on the bias parameter.

bias_val_sd

The prior standard deviation on the log of bias_val (corresponding to parvec[1]). Set bias_val_sd = Inf to have no penalty on the bias parameter.

seq_error_mean

The mean of the logit-normal prior on the sequencing error rate, which corresponds to parvec[2]. Set seq_error_sd = Inf to have no penalty on the sequencing error rate. The default is -4.7, which roughly corresponds to a mean sequencing error value of 0.009. If you want to constain seq_error to be zero, you need to set update_seq_error = FALSE, seq_error = 0, andseq_error_mean = -Inf.

seq_error_sd

The standard deviation of the logit-normal prior on the sequencing error rate, which corresponds to parvec[2]. The default is 1, which at three standard deviations is about a sequencing error rate of 0.15. Set seq_error_sd = Inf to have no penalty on the sequencing error rate.

model

The model for the genotype distribution. Do we assume an F1 population ("f1"), an S1 population ("s1"), Hardy-Weinberg equilibrium ("hw"), or a uniform distribution ("uniform").

Author(s)

David Gerard


dcgerard/updogAlpha documentation built on May 14, 2019, 3:10 a.m.