getLRnullDistribution: Returns the p value of a likelihood ratio based on the...

View source: R/asr_diagnostics.R

getLRnullDistributionR Documentation

Returns the p value of a likelihood ratio based on the simulated null distribution

Description

Returns the p value of a likelihood ratio based on the simulated null distribution

Usage

getLRnullDistribution(
  LR,
  tree,
  Q,
  null_rm,
  alt_rm,
  nsims = 100,
  plot = FALSE,
  ...
)

Arguments

LR

the likelihood ratio between two rate models

tree

the phylogenetic tree to obtain the null distribution on

Q

the transition matrix fit on the null rate model

null_rm

the null rate model (the simpler rate model)

alt_rm

the alternative rate model (the more complex rate model)

nsims

the number of simulations to use generate the null distribution

plot

a boolean expressing whether or not to plot a histogram of likeilhood ratios representing the null distribution

Value

the p value of a given likeihood ratio based on the null distribution that is generated


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.