Description Usage Arguments Details Value Author(s) Examples

View source: R/getMLEandLoglike.R

This function takes a data set and computes the MLE and its Log-Likelihood value.

1 | ```
getMLEandLoglike(data, maxSteps = 50, weightCols = NULL, delta = 10^(-6), weight = NULL)
``` |

`data` |
A data frame in which each column contains the rdp read counts for every taxa given in the row names. |

`maxSteps` |
The maximum number of times to iterate though for the MLE. |

`weightCols` |
A vector of weights for the subjects. |

`delta` |
The minimum threshold of change in f to stop the search for the MLE. |

`weight` |
Deprecated, use weightCols instead |

A unimodal probability model for graph-valued random objects has been derived and applied previously to several types of graphs
(cluster trees, digraphs, and classification and regression trees) (For example, Banks and Constantine, 1998; Shannon and Banks, 1999).
Here we apply this model to HMP trees constructed from RDP matches. Let *G* be the finite set of taxonomic trees with elements
*g*, and *d: G \times G \to R^{+}* an arbitrary metric of distance on *G*. We have the probability measure *H(g^{*},τ)* defined by

*P(g;g^{*},τ) = c(g^{*},τ) \exp(-τ d(g^{*},g) ), for all g \in G,*

where *g^{*}* is the modal or central tree, *τ* is a concentration parameter, and *c(g^{*},τ)* is the normalization constant.
The distance measure between two trees is the Euclidean norm of the difference between their corresponding adjacency-vectors. To estimate the parameters
*(g^{*},τ)*, we use the maximum likelihood estimate (MLE) procedure described in La Rosa et al. (see reference 2)

A list containing the MLE, log-likelihood, tau, the number of iterations it took to run, and some intermediate values

Patricio S. La Rosa, Elena Deych, Berkley Shands, William D. Shannon

1 2 3 4 5 6 7 | ```
data(saliva)
### We use 1 for the maximum number of steps for computation time
### This value should be much higher to ensure an accurate result
numSteps <- 1
mle <- getMLEandLoglike(saliva, numSteps)$mleTree
``` |

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.