mixnormal: The First Iteration of the EM Step

Description Usage Arguments Value References Examples

Description

This function returns one iteration of the EM step for excersize 6.6.8. The initial estimate for the step is theinput vector theta0 while the ouput are the onestep esimates as given on page 409 of the text.

Usage

1
mixnormal(x, theta0)

Arguments

x

a vector of quantiles.

theta0

a vector, first 2 elements are means, next 2 elements are standard deviations, and the last element is the perportion of data from the first population

Value

returns a vector, with mu1, mu2, sig1, sig2 and p

References

Hogg, R. McKean, J. Craig, A. (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson.

Examples

1
2
3
x <- c(5, 7, 2, 1,9)
theta0 <- c(.2, .6, .8, .9, .95)
mixnormal(x, theta0)

joemckean/mathstat documentation built on May 30, 2019, 2:01 p.m.