getMLEandLoglike: Get MLE and Log Likelihood of a Data Set

Description Usage Arguments Details Value Author(s) Examples

View source: R/getMLEandLoglike.R

Description

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

Usage

1
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 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)

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

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

HMPTrees documentation built on May 2, 2019, 4:02 p.m.