ExpoFit-class {RPointCloud} | R Documentation |
The ExpoFit
Class
Description
An ExpoFit
object represents a robust fit to an exponential
distribution, in a form that can conveniently be used as part of an
Empirical Bayes approach to decompose the distributions of cycle
presistence or duration for a topological data analysis performed
using the TDA
package.
Usage
ExpoFit(edata, resn = 200)
## S4 method for signature 'ExpoFit,missing'
plot(x, y, ...)
Arguments
edata |
A numeric vector; the observed data that we think comes mainly from an exponential distribution. |
resn |
A numeric vector of length 1; the resolution (number of breaks) used to estimate a histogram. |
x |
An |
y |
Ignored. |
... |
The usual set of graphical parameters. |
Value
The ExpoFit
function constructs and returns an object of the
ExpoFit
class.
The plot
method returns (invisibly) the ExpoFit object that was
its first argument.
Slots
edata
:A numeric vector; the observed data that we think comes from an exponential distribution.
h0
:A
histogram
object produced by thehist
function applied to the suppliededata
.X0
:A numeric vector containing the midpoints of the breaks in the histogram object.
pdf
:The empirical density function extracted from the histogram object.
mu
:The observed mean of the putative exponential distribution.
lambda
:The robustly estimated parameter of the exponential distribution. Originally crudely repesented by the reciprocal of the mean.
Methods
- plot(x, y, lwd = 2, ...):
-
Produce a plot of a
ExpoFit
object.
Author(s)
Kevin R. Coombes <krc@silicovore.com>
See Also
Examples
data(cytof)
diag <- AML10.node287.rips[["diagram"]]
persistence <- diag[, "Death"] - diag[, "Birth"]
d1 <- persistence[diag[, "dimension"] == 1]
ef <- ExpoFit(d1) # should be close to log(2)/median?
plot(ef)