OUwie.fixed | R Documentation |

Allows the user to calculate the likelihood given a specified set of parameter values

OUwie.fixed(phy, data, model=c("BM1","BMS","OU1","OUM","OUMV","OUMA","OUMVA"), simmap.tree=FALSE, root.age=NULL, scaleHeight=FALSE, root.station=FALSE, get.root.theta=FALSE, shift.point=0.5, alpha=NULL, sigma.sq=NULL, theta=NULL, clade=NULL, mserr="none", check.identify=TRUE, algorithm=c("invert", "three.point"), tip.paths=NULL, quiet=FALSE)

`phy` |
a phylogenetic tree, in |

`data` |
a dataframe containing species information (see Details) |

`model` |
models to fit to comparative data (see Details). |

`simmap.tree` |
a logical indicating whether the input tree is in SIMMAP format. The default is |

`root.age` |
indicates the age of the tree. This is to be used in cases where the "tips" are not contemporary, such as in cases for fossil trees. Default is |

`scaleHeight` |
a logical indicating whether the total tree height should be scaled to 1 (see Details). The default is |

`root.station` |
a logical indicating whether the starting state, |

`get.root.theta` |
a logical indicating whether the starting state, |

`shift.point` |
the point along a branch where a regime change is assumed to have occurred (if |

`alpha` |
a numeric vector giving the values of |

`sigma.sq` |
a numeric vector giving the values of |

`theta` |
a numeric vector giving the values of |

`clade` |
a list containing a pair of taxa whose MRCA is the clade of interest. |

`mserr` |
designates whether a fourth column in the data matrix contains measurement error for each species value ("known"). The measurement error is assumed to be the standard error of the species mean. The default is "none". |

`check.identify` |
a logical indicating whether to check that the user-supplied regime paintings will produce identifiable theta estimates. The default is |

`algorithm` |
designates whether the standard matrix inversion ('invert') or the faster 'three-point' algorithm of Ho and Ane (2013) should be used. |

`tip.paths` |
an optional list that can be provided by the user where each element from 1:nTips is the path from tip to root by labeled node number. The default is NULL and this option is used for internal speedups. |

`quiet` |
a logical indicating whether or not to print progress to the screen. The default is "FALSE". |

The input is a tree and a data file. The tree must be of class “phylo” and must contain the ancestral selective regimes as internal node labels. The data file is a data.frame that must have column entries in the following order: [,1] species names and [,2] their current selective regime. The user specifies the parameter values (i.e. *alpha*, *sigma^2*, and *theta*).

`OUwie.fixed`

returns an object of class `OUwie.fixed`

. This is a list with elements:

`$loglik` |
the maximum log-likelihood. |

`$AIC` |
Akaike information criterion. |

`$AICc` |
Akaike information criterion corrected for sample-size. |

`$BIC` |
Schwartz information criterion. |

`$model` |
The model being fit |

`$param.count` |
The number of parameters counted in the model. |

`$solution` |
a matrix containing the maximum likelihood estimates of |

`$theta` |
a matrix containing the maximum likelihood estimates of |

`$tot.state` |
A vector of names for the different regimes |

`$index.mat` |
The indices of the parameters being estimated are returned. The numbers correspond to the row in the |

`$simmap.tree` |
A logical indicating whether the input phylogeny is a SIMMAP formatted tree. |

`$root.age` |
The user-supplied age at the root of the tree. |

`$shift.point` |
The user-specified portion of the branch where a regime shift occurs. |

`$data` |
User-supplied dataset |

`$phy` |
User-supplied tree |

`$root.station` |
A logical indicating whether the starting state, |

`$scaleHeight` |
Indicates whether the tree was constrained to a total height of 1. |

`$get.root.theta` |
Indicates whether the root.theta was included in the model. |

`$regime.weights` |
A table containing parameter estimates and the weights for time spent in each regime for each tip. |

`$algorithm` |
The algorithm used to estimate parameters. |

Jeremy M. Beaulieu

data(tworegime) #Calculate the likelihood based on known values of #alpha, sigma^2, and theta: alpha=c(0.5632459,0.1726052) sigma.sq=c(0.1064417,0.3461386) theta=c(1.678196,0.4185894) OUwie.fixed(tree,trait,model=c("OUMVA"), simmap.tree=FALSE, scaleHeight=FALSE, clade=NULL, alpha=alpha,sigma.sq=sigma.sq,theta=theta, algorithm="three.point")

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.