hisse.null4(phy, data, f=c(1,1), turnover.anc=rep(c(1,2,3,4),2),
eps.anc=rep(c(1,2,3,4),2), trans.type="equal", condition.on.survival=TRUE,
root.type="madfitz", root.p=NULL, output.type="turnover", sann=FALSE,
sann.its=10000, bounded.search=FALSE, max.tol=.Machine$double.eps^.25,
starting.vals=NULL, turnover.upper=50, eps.upper=50, trans.upper=100)ape phylo format and with internal nodes labeled denoting the ancestral selective regimes.TRUE.NULL.subplex. The default is FALSE.FALSE.subplex.hisse returns an object of class hisse.fit. This is a list with elements:
hisse.Like hisse, users input vectors containing values to indicate how many free parameters are to be estimated for each of the variables in the model. However, the null-four model assumes that turnover.anc and eps.anc are linked between the two observed states. Thus, users are unlikely to alter the inputs much, aside from perhaps fixing turnover.anc or eps.anc to be equal across the four hidden states, where the turnover.anc input vector is set as rep(c(1,1,1,1),2). For a Yule equivalent, the input vector for eps.anc would be rep(c(0,0,0,0),2). For how to setup a null-two model see the example code below.
For user-specified root.p, you should specify the probability for each state. See help for hisse for more on other parameters for this function.
## Not run
# library(diversitree)
# pars <- c(0.1, 0.2, 0.03, 0.03, 0.01, 0.01)
# set.seed(4)
# phy <- tree.bisse(pars, max.t=30, x0=0)
# sim.dat <- data.frame(names(phy$tip.state), phy$tip.state)
## Fit null-four HiSSE:
# pp.hisse.null <- hisse.null4(phy, sim.dat, turnover.anc=rep(c(1,2,3,4),2),
# eps.anc=rep(c(1,2,3,4),2), trans.type="equal")
## Fit null-two HiSSE model:
# trans.rates.hisse <- TransMatMaker(hidden.states=TRUE)
# trans.rates.hisse <- ParDrop(trans.rates.hisse, c(3,5,8,10))
# trans.rates.hisse[!is.na(trans.rates.hisse) & !trans.rates.hisse == 0] = 1
# pp.hisse <- hisse(phy, sim.dat, hidden.states=TRUE, turnover.anc=c(1,1,2,2),
# eps.anc=c(1,1,2,2), trans.rate=trans.rates.hisse)
Run the code above in your browser using DataLab