constrainMkn: Constrain a diversitree mkn model

View source: R/constrainMkn.R

constrainMknR Documentation

Constrain a diversitree mkn model

Description

Returns a likelihood function that has been constrained to match an mkn model of chromosome evolution yielding essentially the original chromevol model.

Usage

constrainMkn(data, lik, hyper, polyploidy, verbose, oneway, constrain)

Arguments

data

This is the data matrix created by running dataMatrx

lik

This is a likelihood function created with make.mkn

hyper

TRUE indicates that a hyperstate col 3 of data is presesnt

polyploidy

TRUE indicates that hyperstate is ploidy

verbose

If TRUE then a list is returned with the first element containing the likelihood function and the second containing the rate identity matrix.

oneway

Default is FALSE if TRUE then transition rate from state 2 back to 1 is zero.

constrain

Takes a list that can include up to 6 items to create different types of constrained models. Options are explained below in the details section.

Details

If the rate identity matrix is returned rates are indicated by the numbers:
rate1 ascending aneuploidy - state1
rate2 descending aneuploidy - state1
rate3 ascending aneuploidy - state2
rate4 descending aneuploidy - state2
rate5 polyploidization of state1
rate6 polploidization of state2
rate7 rediploidization of a state2
rate8 transitions from 1 to 2 for hyperstate
rate9 transitions from 2 to 1 for hyperstate
rate10 demipolyploidy for state1 - even
rate11 demipolyploidy for state1 - odd
rate12 demipolyploidy for state2 - even
rate13 demipolyploidy for state2 - odd
rate14 sex chromosome - autosome fusions (transitions from hyperstate 1 to 2)
rate15 Ro transitions (transitions from hyperstate 2 to 1)


The argument constrain can contain any of the items listed below. The default state is shown.

drop.poly=F
Sets polyploidy rate to zero

drop.demi=F
Sets demiploidy rate to zero

symmetric=F
Sets all chromosome change rates to be symmetric

nometa=F
Drops metastate from analysis

meta="ARD"
Can be set as either "ARD" or "SYM" these have the same meanings as ace in the APE package.

saf.model=F
Models transitions between hyperstates as sex chromosome-autosome fusions (1 -> 2) and Ro transitions (2 -> 1). Follows model described in Anderson et al. 2020.

sym.hyperstates=F
If TRUE, sets one ascendeing and descending transition rate for hyperstates one and two.

Value

constrained likelihood function is returned

Author(s)

Heath Blackmon


coleoguy/chromevolR documentation built on July 27, 2023, 12:40 p.m.