optimizer {MM} | R Documentation |
Maximum likelihood estimator for the MM
Description
Maximum likelihood estimator for the MM
Usage
optimizer(y, n = NULL, start = NULL, method = "nlm",
printing = FALSE, give_fit=FALSE, ...)
optimizer_allsamesum(y, n = NULL, start = NULL, method = "nlm",
printing = FALSE, give_fit=FALSE, ...)
optimizer_differsums(y, n = NULL, start = NULL, method = "nlm",
printing = FALSE, give_fit=FALSE, ...)
Arguments
y |
Matrix with each row being a possible observation |
n |
Counts of observations corresponding to rows of |
start |
Start value for optimization routine, taken to be an object of class
|
method |
String giving which optimization method to use. Default
of |
printing |
Boolean, with |
give_fit |
Boolean, with default |
... |
Further arguments passed to the optimization routine. In
particular, note that |
Details
Function optimizer()
is the user-friendly version: it is a wrapper for
optimizer_samesum()
and optimizer_differsums()
; it
dispatches according to whether the rowsums are identical or not.
These functions are slow because they need to evaluate NormC()
repeatedly, which is expensive.
Function optimizer_samesum()
nominally produces the same output
as Lindsey()
, but is more computationally intensive.
Author(s)
Robin K. S. Hankin
See Also
Examples
data(voting)
p1 <- Lindsey(voting,voting_tally)
p2 <- optimizer(voting,voting_tally,start=p1)
theta(p1) - theta(p2) # Should be zero
## Not run:
data(pollen)
p1 <- optimizer(pollen)
p2 <- Lindsey(pollen)
theta(p1) - theta(p2) # Isn't zero...numerical scruff...
## End(Not run)