getMLEandLoglike {HMPTrees} | R Documentation |
Get MLE and Log Likelihood of a Data Set
Description
This function takes a data set and computes the MLE and its Log-Likelihood value.
Usage
getMLEandLoglike(data, maxSteps = 50, weightCols = NULL, delta = 10^(-6), weight = NULL)
Arguments
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 |
Details
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 be the finite set of taxonomic trees with elements
, and
an arbitrary metric of distance on
. We have the probability measure
defined by
where is the modal or central tree,
is a concentration parameter, and
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
, we use the maximum likelihood estimate (MLE) procedure described in La Rosa et al. (see reference 2)
Value
A list containing the MLE, log-likelihood, tau, the number of iterations it took to run, and some intermediate values
Author(s)
Patricio S. La Rosa, Elena Deych, Berkley Shands, William D. Shannon
Examples
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