| aphylo_estimates {aphylo} | R Documentation | 
Objects of class aphylo_estimates
Description
The model fitting of annotated phylogenetic trees can be done using either
MLE via aphylo_mle() or MCMC via aphylo_mcmc(). This section describes
the object of class aphylo_estimates that these functions generate and
the post estimation methods/functions that can be used.
Usage
## S3 method for class 'aphylo_estimates'
print(x, ...)
## S3 method for class 'aphylo_estimates'
coef(object, ...)
## S3 method for class 'aphylo_estimates'
vcov(object, ...)
## S3 method for class 'aphylo_estimates'
plot(
  x,
  y = NULL,
  which.tree = 1L,
  ids = list(1:Ntip(x)[which.tree]),
  loo = TRUE,
  nsamples = 1L,
  ncores = 1L,
  centiles = c(0.025, 0.5, 0.975),
  cl = NULL,
  ...
)
Arguments
| x,object | Depending of the method, an object of class  | 
| ... | Further arguments passed to the corresponding method. | 
| y | Ignored. | 
| which.tree | Integer scalar. Which tree to plot. | 
| ids,nsamples,ncores,centiles,cl | passed to  | 
| loo | Logical scalar. When  | 
Details
The plot method for the object of class aphylo_estimates plots
the original tree with the predicted annotations.
Value
Objects of class aphylo_estimates are a list withh the following elements:
| par | A numeric vector of length 5 with the solution. | 
| hist | A numeric matrix of size  | 
| ll | A numeric scalar with the value of  | 
| counts | Integer scalar number of steps/batch performed. | 
| convergence | Integer scalar. Equal to 0 if  | 
| message | Character scalar. See  | 
| fun | A function (the objective function). | 
| priors | If specified, the function  | 
| dat | The data  | 
| par0 | A numeric vector of length 5 with the initial parameters. | 
| method | Character scalar with the name of the method used. | 
| varcovar | A matrix of size 5*5. The estimated covariance matrix. | 
The plot method for aphylo_estimates returns the selected tree
(which.tree) with predicted annotations, also of class aphylo.
Examples
set.seed(7881)
atree <- raphylo(40, P = 2)
res   <- aphylo_mcmc(atree ~ mu_d + mu_s + Pi)
print(res)
coef(res)
vcov(res)
plot(res)