This is a utility function for `maxEM`

1 | ```
mstep(x, theta, phi)
``` |

`x` |
a zero-one indicator matrix whose rows correspond to unique lengths with rownames indicating those lengths |

`theta` |
a vector of the abundance estimates. |

`phi` |
a vector of the probabilities of sonicant lengths. |

The M-step for theta is computed. Probably, there is no need to use this function directly, but just in case it is here.

a vector like the input `theta`

Charles C. Berry

1 2 3 4 5 | ```
mat <- diag(10)
mat[ ,10 ] <- 1.0
phi1 <- prop.table( rep(1,10))
theta1 <- 1:10
sonicLength:::mstep( mat, theta1,phi1)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.