## Arrests data

These data and the description below are from the carData package:

We have “data on police treatment of individuals arrested in Toronto for simple possession of small quantities of marijuana. The data are part of a larger data set featured in a series of articles in the Toronto Star newspaper.”

One of the variables in the data set is the “number of police data bases (of previous arrests, previous convictions, parole status, etc.) on which the arrestee’s name appeared; a numeric vector.”

##   released colour year age    sex employed citizen checks
## 1      Yes  White 2002  21   Male      Yes     Yes      3
## 2       No  Black 1999  17   Male      Yes     Yes      3
## 3      Yes  White 2000  24   Male      Yes     Yes      3
## 4       No  Black 2000  46   Male      Yes     Yes      1
## 5      Yes  Black 1999  27 Female      Yes     Yes      1
## 6      Yes  Black 1998  16 Female      Yes     Yes      0
## [1] 5226    8

## Poisson Fit

poisson_fit <- data.frame(
x = seq(from = 0, to = max(Arrests$checks)), pmf = dpois(seq(from = 0, to = max(Arrests$checks)), lambda = mean(Arrestschecks)) ) ggplot(data = Arrests, mapping = aes(x = checks)) + geom_histogram(binwidth = 1, mapping = aes(y = ..density..)) + geom_point(data = poisson_fit, mapping = aes(x = x, y = pmf), color = "orange") + geom_line(data = poisson_fit, mapping = aes(x = x, y = pmf), color = "orange") + theme_bw() ## Zero inflated Poisson fit ### Method of Moments $$E(X) = (1 - \pi) \lambda$$ $$Var(X) = \lambda (1 - \pi) (1 + \pi \lambda)$$ We didn’t have time for this in class, but as an exercise you might try finding the method of moments estimators of $$\pi$$ and $$\lambda$$. ### Maximum Likelihood via Newton’s Method The log likelihood is \begin{align*} \ell(\pi, \lambda) &= \prod_{i: x_i = 0} P(X_i = 0) \prod_{i: x_i \neq 0}P(X_i = x_i) \\ &= \prod_{i: x_i = 0} \left\{ \pi + (1 - \pi) \exp(-\lambda) \right\} \prod_{i: x_i \neq 0} (1 - \pi) \frac{\lambda^{x_i} \exp(-\lambda)}{x_i!} \\ \end{align*} The first and second derivatives are complicated. The functions below calculate the gradient vector and Hessian matrix. loglik <- function(params, n0, n, sum_x) { pi <- params[1] lambda <- params[2] term1 <- n0 * log(pi + (1 - pi) * exp(-lambda)) term2 <- (n - n0) * log(1 - pi) term3 <- sum_x * log(lambda) term4 <- -lambda * (n - n0) return(term1 + term2 + term3 + term4) } calc_dl_dpi <- function(pi, lambda, n0, n, sum_x) { term1 <- n0 * (1 - exp(-lambda)) / (pi + (1 - pi)*exp(-lambda)) term2 <- -1 * (n - n0) / (1 - pi) return( term1 + term2 ) } calc_dl_dlambda <- function(pi, lambda, n0, n, sum_x) { term1 <- -1 * n0 * (1 - pi) * exp(-lambda) / (pi + (1 - pi)*exp(-lambda)) term2 <- sum_x / lambda term3 <- -(n - n0) return( term1 + term2 + term3 ) } calc_grad <- function(pi, lambda, n0, n, sum_x) { return(matrix(c( calc_dl_dpi(pi, lambda, n0, n, sum_x), calc_dl_dlambda(pi, lambda, n0, n, sum_x) ))) } calc_dl2_dpi2 <- function(pi, lambda, n0, n, sum_x) { term1 <- -n0 * (1 - exp(lambda))^2 / (pi + (1 - pi)*exp(-lambda))^2 term2 <- -1 * (n - n0) / (1 - pi)^2 return( term1 + term2 ) } calc_dl2_dlambda2 <- function(pi, lambda, n0, n, sum_x) { term1 <- n0 * (1 - pi)^2 / (pi * exp(lambda) + 1 - pi)^2 term2 <- n0 * (1 - pi) / (pi * exp(lambda) + 1 - pi) term3 <- -1 * sum_x / lambda^2 return( term1 + term2 + term3 ) } calc_dl2_dpi_dlambda <- function(pi, lambda, n0, n, sum_x) { term1 <- n0 * exp(lambda) / (pi * exp(lambda) + (1 - pi))^2 return(term1) } calc_hess <- function(pi, lambda, n0, n, sum_x) { hess <- matrix(NA, nrow = 2, ncol = 2) hess[1, 1] <- calc_dl2_dpi2(pi, lambda, n0, n, sum_x) hess[2, 2] <- calc_dl2_dlambda2(pi, lambda, n0, n, sum_x) hess[1, 2] <- hess[2, 1] <- calc_dl2_dpi_dlambda(pi, lambda, n0, n, sum_x) return(hess) } We update the parameter vector $$\theta = \begin{bmatrix}\pi \\ \lambda \end{bmatrix}$$ via: $\theta^{(i+1)} = \theta^{(i)} - H^{-1} \nabla \ell(\pi, \lambda | x_1, \ldots, x_n)$ update_step <- function(pi, lambda, n0, n, sum_x) { theta <- matrix(c(pi, lambda)) grad <- calc_grad(pi, lambda, n0, n, sum_x) hess <- calc_hess(pi, lambda, n0, n, sum_x) theta_new <- theta - solve(hess, grad) return(theta_new) } I picked starting values for the parameters that were vaguely plausible: • $$pi^{(0)}$$ is the proportion of observations with $$x_i = 0$$ • $$\lambda^{0}$$ is the maximum likelihood estimate for a Poisson distribution pi <- mean(Arrestschecks == 0)
lambda <- mean(Arrests$checks) n0 <- sum(Arrests$checks == 0)
n <- nrow(Arrests)
sum_x <- sum(Arrests\$checks)

max_iter <- 1000
tol <- 1e-8
pi_history <- rep(NA, max_iter)
lambda_history <- rep(NA, max_iter)
loglikelihood_history <- rep(NA, max_iter)

i <- 1
last_change <- Inf
while(i <= max_iter && last_change > tol) {
new_params <- update_step(pi, lambda, n0, n, sum_x)

last_change <- max(abs(pi - new_params[1, 1]), abs(lambda - new_params[2, 1]))
pi_history[i] <- pi <- new_params[1, 1]
lambda_history[i] <- lambda <- new_params[2, 1]
loglikelihood_history[i] <- loglik(new_params, n0, n, sum_x)

print(paste0("iteration ", i, ": pi = ", pi, "; lambda = ", lambda, "; last change = ", last_change))

i <- i + 1
}
## [1] "iteration 1: pi = 0.345260608720573; lambda = 2.16018835955995; last change = 0.523755141037179"
## [1] "iteration 2: pi = 0.343570277642645; lambda = 2.33351737427344; last change = 0.173329014713486"
## [1] "iteration 3: pi = 0.342507862474759; lambda = 2.33304058377096; last change = 0.0010624151678863"
## [1] "iteration 4: pi = 0.341466506620181; lambda = 2.33215592391869; last change = 0.0010413558545776"
## [1] "iteration 5: pi = 0.340444640800363; lambda = 2.33131382013625; last change = 0.00102186581981772"
## [1] "iteration 6: pi = 0.339441892969725; lambda = 2.33048116856108; last change = 0.00100274783063814"
## [1] "iteration 7: pi = 0.338457819981116; lambda = 2.32966024503978; last change = 0.000984072988609086"
## [1] "iteration 8: pi = 0.337491997968711; lambda = 2.32885070951852; last change = 0.000965822012404915"
## [1] "iteration 9: pi = 0.336544015229371; lambda = 2.32805242003912; last change = 0.00094798273934027"
## [1] "iteration 10: pi = 0.33561347221402; lambda = 2.32726522224519; last change = 0.000930543015351171"
## [1] "iteration 11: pi = 0.334699981023487; lambda = 2.32648896520963; last change = 0.000913491190532523"
## [1] "iteration 12: pi = 0.333803164965484; lambda = 2.32572350016734; last change = 0.000896816058003236"
## [1] "iteration 13: pi = 0.332922658130052; lambda = 2.32496868055441; last change = 0.000880506835432282"
## [1] "iteration 14: pi = 0.33205810498536; lambda = 2.3242243619495; last change = 0.000864553144691582"
## [1] "iteration 15: pi = 0.331209159992478; lambda = 2.32349040202532; last change = 0.000848944992881739"
## [1] "iteration 16: pi = 0.330375487238073; lambda = 2.3227666605018; last change = 0.000833672754405101"
## [1] "iteration 17: pi = 0.329556760084037; lambda = 2.32205299910124; last change = 0.000818727154036247"
## [1] "iteration 18: pi = 0.328752660833113; lambda = 2.32134928150555; last change = 0.000804099250924062"
## [1] "iteration 19: pi = 0.327962880409646; lambda = 2.32065537331522; last change = 0.000789780423466724"
## [1] "iteration 20: pi = 0.327187118054642; lambda = 2.31997114201004; last change = 0.000775762355004261"
## [1] "iteration 21: pi = 0.326425081034365; lambda = 2.3192964569115; last change = 0.000762037020277495"
## [1] "iteration 22: pi = 0.325676484361758; lambda = 2.3186311891466; last change = 0.000748596672606128"
## [1] "iteration 23: pi = 0.324941050530016; lambda = 2.31797521161319; last change = 0.000735433831741905"
## [1] "iteration 24: pi = 0.324218509257661; lambda = 2.31732839894661; last change = 0.000722541272355159"
## [1] "iteration 25: pi = 0.323508597244544; lambda = 2.31669062748766; last change = 0.000709912013117264"
## [1] "iteration 26: pi = 0.322811057938201; lambda = 2.31606177525168; last change = 0.000697539306343031"
## [1] "iteration 27: pi = 0.322125641310042; lambda = 2.31544172189882; last change = 0.000685416628159241"
## [1] "iteration 28: pi = 0.321452103640872; lambda = 2.31483034870541; last change = 0.000673537669169832"
## [1] "iteration 29: pi = 0.320790207315285; lambda = 2.31422753853623; last change = 0.00066189632558683"
## [1] "iteration 30: pi = 0.320139720624483; lambda = 2.31363317581785; last change = 0.000650486690802143"
## [1] "iteration 31: pi = 0.31950041757711; lambda = 2.31304714651276; last change = 0.000639303047372752"
## [1] "iteration 32: pi = 0.318872077717712; lambda = 2.31246933809443; last change = 0.000628339859397975"
## [1] "iteration 33: pi = 0.318254485952448; lambda = 2.31189963952312; last change = 0.000617591765264547"
## [1] "iteration 34: pi = 0.317647432381707; lambda = 2.31133794122245; last change = 0.000607053570740756"
## [1] "iteration 35: pi = 0.317050712139308; lambda = 2.31078413505672; last change = 0.000596720242398818"
## [1] "iteration 36: pi = 0.31646412523796; lambda = 2.31023811430888; last change = 0.00058658690134844"
## [1] "iteration 37: pi = 0.315887476420696; lambda = 2.30969977365912; last change = 0.000576648817263437"
## [1] "iteration 38: pi = 0.315320575018009; lambda = 2.30916900916412; last change = 0.000566901402686948"
## [1] "iteration 39: pi = 0.314763234810411; lambda = 2.30864571823684; last change = 0.000557340207598567"
## [1] "iteration 40: pi = 0.31421527389618; lambda = 2.30812979962685; last change = 0.000547960914231038"
## [1] "iteration 41: pi = 0.313676514564058; lambda = 2.30762115340117; last change = 0.000538759332121663"
## [1] "iteration 42: pi = 0.313146783170671; lambda = 2.30711968092568; last change = 0.000529731393387523"
## [1] "iteration 43: pi = 0.312625910022459; lambda = 2.30662528484688; last change = 0.000520873148211587"
## [1] "iteration 44: pi = 0.312113729261929; lambda = 2.30613786907415; last change = 0.000512180760529835"
## [1] "iteration 45: pi = 0.311610078758021; lambda = 2.30565733876246; last change = 0.000503650503907993"
## [1] "iteration 46: pi = 0.311114800000422; lambda = 2.30518360029541; last change = 0.000495278757598916"
## [1] "iteration 47: pi = 0.310627737997651; lambda = 2.30471656126873; last change = 0.000487062002771488"
## [1] "iteration 48: pi = 0.310148741178749; lambda = 2.30425613047405; last change = 0.000478996818901511"
## [1] "iteration 49: pi = 0.309677661298432; lambda = 2.30380221788314; last change = 0.000471079880317637"
## [1] "iteration 50: pi = 0.309214353345538; lambda = 2.30335473463231; last change = 0.000463307952893732"
## [1] "iteration 51: pi = 0.308758675454657; lambda = 2.30291359300732; last change = 0.000455677890880857"
## [1] "iteration 52: pi = 0.308310488820785; lambda = 2.30247870642843; last change = 0.000448186633872083"
## [1] "iteration 53: pi = 0.307869657616892; lambda = 2.30204998943581; last change = 0.000440831203893211"
## [1] "iteration 54: pi = 0.307436048914278; lambda = 2.30162735767524; last change = 0.000433608702614108"
## [1] "iteration 55: pi = 0.307009532605604; lambda = 2.30121072788404; last change = 0.000426516308673741"
## [1] "iteration 56: pi = 0.306589981330489; lambda = 2.30080001787721; last change = 0.000419551275114671"
## [1] "iteration 57: pi = 0.306177270403568; lambda = 2.30039514653395; last change = 0.000412710926920967"
## [1] "iteration 58: pi = 0.305771277744913; lambda = 2.29999603378424; last change = 0.000405992658655152"
## [1] "iteration 59: pi = 0.305371883812724; lambda = 2.2996026005958; last change = 0.000399393932189018"
## [1] "iteration 60: pi = 0.304978971538199; lambda = 2.29921476896113; last change = 0.000392912274524759"
## [1] "iteration 61: pi = 0.304592426262498; lambda = 2.29883246188483; last change = 0.000386545275701478"
## [1] "iteration 62: pi = 0.304212135675714; lambda = 2.29845560337115; last change = 0.000380290586783405"
## [1] "iteration 63: pi = 0.303837989757788; lambda = 2.29808411841161; last change = 0.000374145917926449"
## [1] "iteration 64: pi = 0.303469880721269; lambda = 2.29771793297297; last change = 0.000368109036519071"
## [1] "iteration 65: pi = 0.303107702955875; lambda = 2.29735697398519; last change = 0.000362177765394156"
## [1] "iteration 66: pi = 0.302751352974766; lambda = 2.29700116932975; last change = 0.000356349981109116"
## [1] "iteration 67: pi = 0.302400729362475; lambda = 2.296650447828; last change = 0.000350721501757523"
## [1] "iteration 68: pi = 0.302055732724432; lambda = 2.2963047392297; last change = 0.000345708598295413"
## [1] "iteration 69: pi = 0.301716265638022; lambda = 2.2959639742018; last change = 0.000340765027897927"
## [1] "iteration 70: pi = 0.301382232605116; lambda = 2.29562808431725; last change = 0.000335889884551577"
## [1] "iteration 71: pi = 0.301053540006029; lambda = 2.29529700204403; last change = 0.000331082273221206"
## [1] "iteration 72: pi = 0.300730096054851; lambda = 2.29497066073431; last change = 0.000326341309722977"
## [1] "iteration 73: pi = 0.300411810756089; lambda = 2.29464899461373; last change = 0.000321666120574271"
## [1] "iteration 74: pi = 0.300098595862591; lambda = 2.29433193877087; last change = 0.000317055842863567"
## [1] "iteration 75: pi = 0.299790364834696; lambda = 2.29401942914675; last change = 0.000312509624115886"
## [1] "iteration 76: pi = 0.299487032800564; lambda = 2.29371140252458; last change = 0.000308026622168001"
## [1] "iteration 77: pi = 0.299188516517654; lambda = 2.29340779651955; last change = 0.000303606005038315"
## [1] "iteration 78: pi = 0.298894734335299; lambda = 2.29310854956874; last change = 0.000299246950809184"
## [1] "iteration 79: pi = 0.298605606158344; lambda = 2.29281360092123; last change = 0.000294948647504345"
## [1] "iteration 80: pi = 0.298321053411817; lambda = 2.29252289062826; last change = 0.000290710292971674"
## [1] "iteration 81: pi = 0.298040999006583; lambda = 2.29223635953349; last change = 0.000286531094771281"
## [1] "iteration 82: pi = 0.297765367305962; lambda = 2.29195394926343; last change = 0.00028241027005782"
## [1] "iteration 83: pi = 0.297494084093266; lambda = 2.29167560221795; last change = 0.0002783470454788"
## [1] "iteration 84: pi = 0.297227076540234; lambda = 2.29140126156089; last change = 0.000274340657059113"
## [1] "iteration 85: pi = 0.296964273176327; lambda = 2.2911308712108; last change = 0.000270390350097127"
## [1] "iteration 86: pi = 0.296705603858859; lambda = 2.29086437583173; last change = 0.000266495379063869"
## [1] "iteration 87: pi = 0.296450999743933; lambda = 2.29060172082424; last change = 0.000262655007495116"
## [1] "iteration 88: pi = 0.296200393258161; lambda = 2.29034285231634; last change = 0.000258868507897247"
## [1] "iteration 89: pi = 0.295953718071136; lambda = 2.2900877171547; last change = 0.000255135161643327"
## [1] "iteration 90: pi = 0.29571090906863; lambda = 2.28983626289582; last change = 0.000251454258874073"
## [1] "iteration 91: pi = 0.295471902326508; lambda = 2.28958843779741; last change = 0.000247825098411703"
## [1] "iteration 92: pi = 0.295236635085316; lambda = 2.28934419080976; last change = 0.000244246987652019"
## [1] "iteration 93: pi = 0.295005045725535; lambda = 2.28910347156728; last change = 0.000240719242481813"
## [1] "iteration 94: pi = 0.294777073743475; lambda = 2.2888662303801; last change = 0.000237241187179826"
## [1] "iteration 95: pi = 0.294552659727791; lambda = 2.28863241822577; last change = 0.000233812154330604"
## [1] "iteration 96: pi = 0.294331745336598; lambda = 2.28840198674103; last change = 0.000230431484733895"
## [1] "iteration 97: pi = 0.294114273275168; lambda = 2.28817488821372; last change = 0.000227098527311398"
## [1] "iteration 98: pi = 0.293900187274189; lambda = 2.28795107557469; last change = 0.00022381263902771"
## [1] "iteration 99: pi = 0.293689432068579; lambda = 2.2877305023899; last change = 0.000220573184795736"
## [1] "iteration 100: pi = 0.293481953376818; lambda = 2.2875131228525; last change = 0.000217379537396756"
## [1] "iteration 101: pi = 0.293277697880804; lambda = 2.28729889177511; last change = 0.000214231077392935"
## [1] "iteration 102: pi = 0.293076613206199; lambda = 2.28708776458206; last change = 0.00021112719304428"
## [1] "iteration 103: pi = 0.292878647903264; lambda = 2.28687969730184; last change = 0.000208067280228263"
## [1] "iteration 104: pi = 0.292683751428163; lambda = 2.28667464655948; last change = 0.000205050742352775"
## [1] "iteration 105: pi = 0.292491874124711; lambda = 2.2864725695692; last change = 0.000202076990282407"
## [1] "iteration 106: pi = 0.292302967206582; lambda = 2.28627342412695; last change = 0.000199145442249637"
## [1] "iteration 107: pi = 0.292116982739924; lambda = 2.28607716860317; last change = 0.00019625552378244"
## [1] "iteration 108: pi = 0.291933873626407; lambda = 2.28588376193555; last change = 0.000193406667622575"
## [1] "iteration 109: pi = 0.291753593586667; lambda = 2.2856931636219; last change = 0.000190598313648316"
## [1] "iteration 110: pi = 0.291576097144137; lambda = 2.2855053337131; last change = 0.000187829908795845"
## [1] "iteration 111: pi = 0.29140133960927; lambda = 2.28532023280612; last change = 0.000185100906984204"
## [1] "iteration 112: pi = 0.291229277064123; lambda = 2.28513782203708; last change = 0.000182410769040242"
## [1] "iteration 113: pi = 0.291059866347304; lambda = 2.28495806307446; last change = 0.000179758962619125"
## [1] "iteration 114: pi = 0.290893065039265; lambda = 2.28478091811232; last change = 0.000177144962137277"
## [1] "iteration 115: pi = 0.290728831447937; lambda = 2.28460634986363; last change = 0.000174568248690221"
## [1] "iteration 116: pi = 0.290567124594694; lambda = 2.28443432155365; last change = 0.000172028309985972"
## [1] "iteration 117: pi = 0.290407904200637; lambda = 2.28426479691338; last change = 0.000169524640267316"
## [1] "iteration 118: pi = 0.290251130673188; lambda = 2.28409774017313; last change = 0.00016705674024653"
## [1] "iteration 119: pi = 0.290096765092993; lambda = 2.28393311605611; last change = 0.000164624117024115"
## [1] "iteration 120: pi = 0.289944769201111; lambda = 2.28377088977208; last change = 0.000162226284027955"
## [1] "iteration 121: pi = 0.289795105386496; lambda = 2.28361102701114; last change = 0.000159862760938712"
## [1] "iteration 122: pi = 0.289647736673759; lambda = 2.28345349393752; last change = 0.000157533073617877"
## [1] "iteration 123: pi = 0.289502626711194; lambda = 2.28329825718348; last change = 0.000155236754043386"
## [1] "iteration 124: pi = 0.289359739759075; lambda = 2.28314528384324; last change = 0.00015297334023856"
## [1] "iteration 125: pi = 0.289219040678211; lambda = 2.28299454146703; last change = 0.000150742376206381"
## [1] "iteration 126: pi = 0.289080494918744; lambda = 2.28284599805518; last change = 0.000148543411857993"
## [1] "iteration 127: pi = 0.288944068509196; lambda = 2.28269962205223; last change = 0.000146376002950532"
## [1] "iteration 128: pi = 0.288809728045756; lambda = 2.28255538234121; last change = 0.000144239711018734"
## [1] "iteration 129: pi = 0.28867744068179; lambda = 2.2824132482379; last change = 0.000142134103309655"
## [1] "iteration 130: pi = 0.288547174117583; lambda = 2.28227318948518; last change = 0.000140058752717831"
## [1] "iteration 131: pi = 0.288418896590301; lambda = 2.28213517624746; last change = 0.000138013237720891"
## [1] "iteration 132: pi = 0.288292576864158; lambda = 2.28199917910514; last change = 0.000135997142315603"
## [1] "iteration 133: pi = 0.288168184220801; lambda = 2.28186516904919; last change = 0.000134010055951261"
## [1] "iteration 134: pi = 0.288045688449894; lambda = 2.28173311747572; last change = 0.000132051573475067"
## [1] "iteration 135: pi = 0.287925059839898; lambda = 2.28160299618066; last change = 0.000130121295059293"
## [1] "iteration 136: pi = 0.287806269169051; lambda = 2.28147477735451; last change = 0.000128218826148441"
## [1] "iteration 137: pi = 0.287689287696522; lambda = 2.28134843357712; last change = 0.000126343777389515"
## [1] "iteration 138: pi = 0.287574087153766; lambda = 2.28122393781254; last change = 0.000124495764582733"
## [1] "iteration 139: pi = 0.287460639736044; lambda = 2.28110126340393; last change = 0.000122674408607804"
## [1] "iteration 140: pi = 0.287348918094125; lambda = 2.28098038406856; last change = 0.000120879335373747"
## [1] "iteration 141: pi = 0.287238895326152; lambda = 2.2808612738928; last change = 0.000119110175758053"
## [1] "iteration 142: pi = 0.287130544969685; lambda = 2.28074390732725; last change = 0.000117366565544064"
## [1] "iteration 143: pi = 0.287023840993888; lambda = 2.28062825918189; last change = 0.000115648145367242"
## [1] "iteration 144: pi = 0.286918757791894; lambda = 2.28051430462123; last change = 0.000113954560656104"
## [1] "iteration 145: pi = 0.286815270173311; lambda = 2.28040201915966; last change = 0.000112285461574491"
## [1] "iteration 146: pi = 0.286713353356881; lambda = 2.28029137865669; last change = 0.000110640502963832"
## [1] "iteration 147: pi = 0.28661298296329; lambda = 2.2801823593124; last change = 0.000109019344292527"
## [1] "iteration 148: pi = 0.286514135008117; lambda = 2.28007493766281; last change = 0.00010742164959332"
## [1] "iteration 149: pi = 0.286416785894926; lambda = 2.27996909057539; last change = 0.000105847087411792"
## [1] "iteration 150: pi = 0.286320912408493; lambda = 2.27986479524464; last change = 0.000104295330753512"
## [1] "iteration 151: pi = 0.286226491708169; lambda = 2.27976202918762; last change = 0.000102766057024972"
## [1] "iteration 152: pi = 0.286133501321367; lambda = 2.27966077023963; last change = 0.00010125894798696"
## [1] "iteration 153: pi = 0.286041919137189; lambda = 2.27956099654994; last change = 9.97736896937162e-05"
## [1] "iteration 154: pi = 0.285951723400163; lambda = 2.27946268657749; last change = 9.83099724485292e-05"
## [1] "iteration 155: pi = 0.285862892704113; lambda = 2.27936581908674; last change = 9.68674907442235e-05"
## [1] "iteration 156: pi = 0.285775405986138; lambda = 2.27927037314353; last change = 9.54459432165322e-05"
## [1] "iteration 157: pi = 0.285689242520721; lambda = 2.27917632811093; last change = 9.40450325912501e-05"
## [1] "iteration 158: pi = 0.285604381913935; lambda = 2.2790836636453; last change = 9.26644656362718e-05"
## [1] "iteration 159: pi = 0.285520804097774; lambda = 2.27899235969219; last change = 9.1303953105637e-05"
## [1] "iteration 160: pi = 0.285438489324582; lambda = 2.2789023964825; last change = 8.99632096973413e-05"
## [1] "iteration 161: pi = 0.285357418161596; lambda = 2.2788137545285; last change = 8.86419539982697e-05"
## [1] "iteration 162: pi = 0.285277571485592; lambda = 2.27872641462006; last change = 8.73399084393434e-05"
## [1] "iteration 163: pi = 0.285198930477622; lambda = 2.27864035782081; last change = 8.6056799247558e-05"
## [1] "iteration 164: pi = 0.285121476617866; lambda = 2.27855556546442; last change = 8.47923563949138e-05"
## [1] "iteration 165: pi = 0.285045191680571; lambda = 2.27847201915086; last change = 8.3546313554006e-05"
## [1] "iteration 166: pi = 0.284970057729084; lambda = 2.27838970074281; last change = 8.23184080522843e-05"
## [1] "iteration 167: pi = 0.284896057110987; lambda = 2.27830859236198; last change = 8.1108380824535e-05"
## [1] "iteration 168: pi = 0.284823172453312; lambda = 2.27822867638562; last change = 7.99159763658075e-05"
## [1] "iteration 169: pi = 0.28475138665785; lambda = 2.27814993544293; last change = 7.8740942689226e-05"
## [1] "iteration 170: pi = 0.284680682896549; lambda = 2.27807235241165; last change = 7.75830312793602e-05"
## [1] "iteration 171: pi = 0.284611044606996; lambda = 2.2779959104146; last change = 7.64419970495922e-05"
## [1] "iteration 172: pi = 0.284542455487975; lambda = 2.27792059281631; last change = 7.53175982941556e-05"
## [1] "iteration 173: pi = 0.28447489949512; lambda = 2.27784638321965; last change = 7.42095966534961e-05"
## [1] "iteration 174: pi = 0.284408360836633; lambda = 2.27777326546259; last change = 7.31177570592045e-05"
## [1] "iteration 175: pi = 0.284342823969097; lambda = 2.27770122361489; last change = 7.20418477033746e-05"
## [1] "iteration 176: pi = 0.284278273593344; lambda = 2.2776302419749; last change = 7.09816399906416e-05"
## [1] "iteration 177: pi = 0.284214694650422; lambda = 2.2775603050664; last change = 6.99369084951051e-05"
## [1] "iteration 178: pi = 0.284152072317614; lambda = 2.27749139763548; last change = 6.8907430926135e-05"
## [1] "iteration 179: pi = 0.284090392004542; lambda = 2.2774235046474; last change = 6.78929880790768e-05"
## [1] "iteration 180: pi = 0.284029639349337; lambda = 2.27735661128359; last change = 6.68933638046099e-05"
## [1] "iteration 181: pi = 0.283969800214879; lambda = 2.27729070293864; last change = 6.59083449590092e-05"
## [1] "iteration 182: pi = 0.2839108606851; lambda = 2.27722576521726; last change = 6.49377213743918e-05"
## [1] "iteration 183: pi = 0.283852807061363; lambda = 2.27716178393145; last change = 6.39812858129751e-05"
## [1] "iteration 184: pi = 0.283795625858891; lambda = 2.27709874509752; last change = 6.30388339315502e-05"
## [1] "iteration 185: pi = 0.283739303803275; lambda = 2.27703663493327; last change = 6.21101642450661e-05"
## [1] "iteration 186: pi = 0.283683827827035; lambda = 2.27697543985519; last change = 6.11950780853299e-05"
## [1] "iteration 187: pi = 0.283629185066243; lambda = 2.27691514647562; last change = 6.02933795668115e-05"
## [1] "iteration 188: pi = 0.283575362857204; lambda = 2.27685574160007; last change = 5.94048755493404e-05"
## [1] "iteration 189: pi = 0.283522348733204; lambda = 2.27679721222447; last change = 5.85293756016902e-05"
## [1] "iteration 190: pi = 0.283470130421305; lambda = 2.2767395455325; last change = 5.76666919647195e-05"
## [1] "iteration 191: pi = 0.283418695839201; lambda = 2.27668272889299; last change = 5.68166395180647e-05"
## [1] "iteration 192: pi = 0.283368033092129; lambda = 2.27662674985724; last change = 5.59790357450574e-05"
## [1] "iteration 193: pi = 0.283318130469836; lambda = 2.27657159615655; last change = 5.51537006936442e-05"
## [1] "iteration 194: pi = 0.283268976443589; lambda = 2.2765172556996; last change = 5.43404569506301e-05"
## [1] "iteration 195: pi = 0.283220559663254; lambda = 2.27646371657; last change = 5.35391295977128e-05"
## [1] "iteration 196: pi = 0.283172868954409; lambda = 2.27641096702381; last change = 5.27495461879468e-05"
## [1] "iteration 197: pi = 0.283125893315517; lambda = 2.27635899548711; last change = 5.19715367048867e-05"
## [1] "iteration 198: pi = 0.283079621915143; lambda = 2.27630779055357; last change = 5.12049335372744e-05"
## [1] "iteration 199: pi = 0.283034044089225; lambda = 2.27625734098213; last change = 5.04495714368502e-05"
## [1] "iteration 200: pi = 0.282989149338381; lambda = 2.27620763569463; last change = 4.97052874979254e-05"
## [1] "iteration 201: pi = 0.282944927325277; lambda = 2.27615866377352; last change = 4.89719211178574e-05"
## [1] "iteration 202: pi = 0.282901367872026; lambda = 2.27611041445955; last change = 4.82493139690732e-05"
## [1] "iteration 203: pi = 0.282858460957641; lambda = 2.27606287714958; last change = 4.75373099693144e-05"
## [1] "iteration 204: pi = 0.282816196715527; lambda = 2.27601604139433; last change = 4.68357552465548e-05"
## [1] "iteration 205: pi = 0.282774565431017; lambda = 2.27596989689621; last change = 4.61444981172399e-05"
## [1] "iteration 206: pi = 0.282733557538951; lambda = 2.27592443350717; last change = 4.54633890476508e-05"
## [1] "iteration 207: pi = 0.282693163621293; lambda = 2.27587964122654; last change = 4.47922806308121e-05"
## [1] "iteration 208: pi = 0.282653374404792; lambda = 2.27583551019898; last change = 4.41310275567375e-05"
## [1] "iteration 209: pi = 0.28261418075868; lambda = 2.2757920307124; last change = 4.34794865804555e-05"
## [1] "iteration 210: pi = 0.28257557369241; lambda = 2.2757491931959; last change = 4.28375164962524e-05"
## [1] "iteration 211: pi = 0.282537544353431; lambda = 2.27570698821779; last change = 4.22049781145795e-05"
## [1] "iteration 212: pi = 0.282500084025004; lambda = 2.27566540648356; last change = 4.15817342243052e-05"
## [1] "iteration 213: pi = 0.282463184124047; lambda = 2.27562443883399; last change = 4.09676495740641e-05"
## [1] "iteration 214: pi = 0.282426836199028; lambda = 2.27558407624315; last change = 4.03625908411698e-05"
## [1] "iteration 215: pi = 0.282391031927879; lambda = 2.27554430981654; last change = 3.97664266085229e-05"
## [1] "iteration 216: pi = 0.282355763115957; lambda = 2.2755051307892; last change = 3.9179027335301e-05"
## [1] "iteration 217: pi = 0.282321021694034; lambda = 2.27546653052387; last change = 3.86002653307571e-05"
## [1] "iteration 218: pi = 0.282286799716318; lambda = 2.27542850050914; last change = 3.80300147351242e-05"
## [1] "iteration 219: pi = 0.282253089358512; lambda = 2.27539103235765; last change = 3.7468151484088e-05"
## [1] "iteration 220: pi = 0.282219882915902; lambda = 2.27535411780436; last change = 3.69145532945758e-05"
## [1] "iteration 221: pi = 0.282187172801475; lambda = 2.27531774870473; last change = 3.63690996310062e-05"
## [1] "iteration 222: pi = 0.282154951544078; lambda = 2.27528191703304; last change = 3.58316716888574e-05"
## [1] "iteration 223: pi = 0.28212321178659; lambda = 2.27524661488067; last change = 3.53021523653574e-05"
## [1] "iteration 224: pi = 0.282091946284142; lambda = 2.27521183445444; last change = 3.4780426238612e-05"
## [1] "iteration 225: pi = 0.282061147902356; lambda = 2.27517756807489; last change = 3.42663795427356e-05"
## [1] "iteration 226: pi = 0.282030809615614; lambda = 2.27514380817475; last change = 3.37599001460909e-05"
## [1] "iteration 227: pi = 0.282000924505358; lambda = 2.27511054729722; last change = 3.32608775290844e-05"
## [1] "iteration 228: pi = 0.28197148575842; lambda = 2.27507777809446; last change = 3.27692027588533e-05"
## [1] "iteration 229: pi = 0.281942486665368; lambda = 2.27504549332599; last change = 3.22847684723904e-05"
## [1] "iteration 230: pi = 0.281913920618898; lambda = 2.27501368585714; last change = 3.18074688467895e-05"
## [1] "iteration 231: pi = 0.281885781112233; lambda = 2.27498234865755; last change = 3.13371995868117e-05"
## [1] "iteration 232: pi = 0.281858061737558; lambda = 2.27495147479966; last change = 3.08738578964629e-05"
## [1] "iteration 233: pi = 0.281830756184483; lambda = 2.27492105745719; last change = 3.04173424630072e-05"
## [1] "iteration 234: pi = 0.281803858238524; lambda = 2.27489108990376; last change = 2.99675534320976e-05"
## [1] "iteration 235: pi = 0.281777361779611; lambda = 2.27486156551137; last change = 2.95243923900124e-05"
## [1] "iteration 236: pi = 0.281751260780625; lambda = 2.27483247774903; last change = 2.90877623427832e-05"
## [1] "iteration 237: pi = 0.281725549305949; lambda = 2.27480382018133; last change = 2.8657567697099e-05"
## [1] "iteration 238: pi = 0.281700221510052; lambda = 2.27477558646709; last change = 2.82337142381017e-05"
## [1] "iteration 239: pi = 0.281675271636092; lambda = 2.27474777035798; last change = 2.78161091125106e-05"
## [1] "iteration 240: pi = 0.28165069401454; lambda = 2.27472036569717; last change = 2.74046608099709e-05"
## [1] "iteration 241: pi = 0.281626483061828; lambda = 2.27469336641803; last change = 2.69992791412932e-05"
## [1] "iteration 242: pi = 0.28160263327902; lambda = 2.27466676654281; last change = 2.65998752224661e-05"
## [1] "iteration 243: pi = 0.2815791392505; lambda = 2.27464056018135; last change = 2.62063614537844e-05"
## [1] "iteration 244: pi = 0.281555995642688; lambda = 2.27461474152985; last change = 2.58186515060821e-05"
## [1] "iteration 245: pi = 0.281533197202769; lambda = 2.27458930486955; last change = 2.54366602976397e-05"
## [1] "iteration 246: pi = 0.281510738757448; lambda = 2.27456424456557; last change = 2.50603039795294e-05"
## [1] "iteration 247: pi = 0.281488615211722; lambda = 2.27453955506565; last change = 2.46894999178515e-05"
## [1] "iteration 248: pi = 0.281466821547672; lambda = 2.27451523089898; last change = 2.4324166676859e-05"
## [1] "iteration 249: pi = 0.281445352823278; lambda = 2.27449126667498; last change = 2.39642239994176e-05"
## [1] "iteration 250: pi = 0.281424204171246; lambda = 2.27446765708218; last change = 2.36095927950153e-05"
## [1] "iteration 251: pi = 0.281403370797859; lambda = 2.27444439688706; last change = 2.32601951184463e-05"
## [1] "iteration 252: pi = 0.281382847981846; lambda = 2.2744214809329; last change = 2.29159541578206e-05"
## [1] "iteration 253: pi = 0.281362631073264; lambda = 2.27439890413869; last change = 2.25767942123589e-05"
## [1] "iteration 254: pi = 0.281342715492407; lambda = 2.27437666149801; last change = 2.22426406866205e-05"
## [1] "iteration 255: pi = 0.281323096728723; lambda = 2.27435474807794; last change = 2.19134200629689e-05"
## [1] "iteration 256: pi = 0.281303770339752; lambda = 2.27433315901805; last change = 2.15890598962432e-05"
## [1] "iteration 257: pi = 0.281284731950086; lambda = 2.27431188952925; last change = 2.12694887919973e-05"
## [1] "iteration 258: pi = 0.281265977250331; lambda = 2.27429093489286; last change = 2.0954636394066e-05"
## [1] "iteration 259: pi = 0.281247501996104; lambda = 2.27427029045949; last change = 2.06444333703537e-05"
## [1] "iteration 260: pi = 0.281229302007033; lambda = 2.27424995164809; last change = 2.03388113986236e-05"
## [1] "iteration 261: pi = 0.281211373165775; lambda = 2.27422991394494; last change = 2.0037703147846e-05"
## [1] "iteration 262: pi = 0.281193711417052; lambda = 2.27421017290267; last change = 1.97410422693167e-05"
## [1] "iteration 263: pi = 0.281176312766703; lambda = 2.27419072413929; last change = 1.94487633797813e-05"
## [1] "iteration 264: pi = 0.281159173280747; lambda = 2.27417156333725; last change = 1.91608020490008e-05"
## [1] "iteration 265: pi = 0.281142289084463; lambda = 2.27415268624246; last change = 1.88770947846528e-05"
## [1] "iteration 266: pi = 0.281125656361487; lambda = 2.27413408866344; last change = 1.85975790203408e-05"
## [1] "iteration 267: pi = 0.281109271352914; lambda = 2.27411576647034; last change = 1.83221931013833e-05"
## [1] "iteration 268: pi = 0.28109313035643; lambda = 2.27409771559407; last change = 1.80508762710474e-05"
## [1] "iteration 269: pi = 0.281077229725438; lambda = 2.2740799320254; last change = 1.7783568662999e-05"
## [1] "iteration 270: pi = 0.281061565868217; lambda = 2.27406241181413; last change = 1.7520211276878e-05"
## [1] "iteration 271: pi = 0.281046135247079; lambda = 2.27404515106815; last change = 1.72607459809626e-05"
## [1] "iteration 272: pi = 0.281030934377548; lambda = 2.27402814595266; last change = 1.70051154868567e-05"
## [1] "iteration 273: pi = 0.281015959827548; lambda = 2.27401139268932; last change = 1.67532633450485e-05"
## [1] "iteration 274: pi = 0.281001208216604; lambda = 2.27399488755539; last change = 1.65051339289235e-05"
## [1] "iteration 275: pi = 0.28098667621506; lambda = 2.27397862688296; last change = 1.62606724267711e-05"
## [1] "iteration 276: pi = 0.280972360543301; lambda = 2.27396260705814; last change = 1.60198248235766e-05"
## [1] "iteration 277: pi = 0.280958257970995; lambda = 2.27394682452024; last change = 1.57825378979126e-05"
## [1] "iteration 278: pi = 0.28094436531634; lambda = 2.27393127576103; last change = 1.55487592041759e-05"
## [1] "iteration 279: pi = 0.28093067944533; lambda = 2.27391595732397; last change = 1.53184370628168e-05"
## [1] "iteration 280: pi = 0.280917197271025; lambda = 2.27390086580342; last change = 1.50915205527902e-05"
## [1] "iteration 281: pi = 0.280903915752838; lambda = 2.27388599784392; last change = 1.48679594937917e-05"
## [1] "iteration 282: pi = 0.280890831895831; lambda = 2.27387135013948; last change = 1.46477044435933e-05"
## [1] "iteration 283: pi = 0.280877942750021; lambda = 2.2738569194328; last change = 1.44307066820559e-05"
## [1] "iteration 284: pi = 0.280865245409698; lambda = 2.2738427025146; last change = 1.42169182000274e-05"
## [1] "iteration 285: pi = 0.280852737012752; lambda = 2.2738286962229; last change = 1.40062916949013e-05"
## [1] "iteration 286: pi = 0.280840414740016; lambda = 2.27381489744235; last change = 1.37987805519657e-05"
## [1] "iteration 287: pi = 0.280828275814609; lambda = 2.27380130310351; last change = 1.3594338846179e-05"
## [1] "iteration 288: pi = 0.2808163175013; lambda = 2.27378791018219; last change = 1.33929213159689e-05"
## [1] "iteration 289: pi = 0.280804537105872; lambda = 2.27377471569882; last change = 1.31944833712261e-05"
## [1] "iteration 290: pi = 0.280792931974505; lambda = 2.27376171671775; last change = 1.29989810702114e-05"
## [1] "iteration 291: pi = 0.280781499493163; lambda = 2.27374891034663; last change = 1.28063711168913e-05"
## [1] "iteration 292: pi = 0.280770237086992; lambda = 2.27373629373578; last change = 1.26166108507242e-05"
## [1] "iteration 293: pi = 0.280759142219723; lambda = 2.27372386407755; last change = 1.24296582333372e-05"
## [1] "iteration 294: pi = 0.280748212393094; lambda = 2.2737116186057; last change = 1.22454718489706e-05"
## [1] "iteration 295: pi = 0.280737445146273; lambda = 2.27369955459482; last change = 1.20640108809411e-05"
## [1] "iteration 296: pi = 0.280726838055289; lambda = 2.2736876693597; last change = 1.18852351187471e-05"
## [1] "iteration 297: pi = 0.28071638873248; lambda = 2.27367596025476; last change = 1.17091049376405e-05"
## [1] "iteration 298: pi = 0.280706094825939; lambda = 2.27366442467346; last change = 1.15355812959628e-05"
## [1] "iteration 299: pi = 0.280695954018979; lambda = 2.27365306004774; last change = 1.13646257253741e-05"
## [1] "iteration 300: pi = 0.280685964029595; lambda = 2.27364186384742; last change = 1.11962003188637e-05"
## [1] "iteration 301: pi = 0.280676122609946; lambda = 2.27363083357969; last change = 1.10302677320817e-05"
## [1] "iteration 302: pi = 0.280666427545835; lambda = 2.27361996678853; last change = 1.0866791161579e-05"
## [1] "iteration 303: pi = 0.280656876656204; lambda = 2.27360926105417; last change = 1.07057343523564e-05"
## [1] "iteration 304: pi = 0.280647467792633; lambda = 2.2735987139926; last change = 1.05470615752168e-05"
## [1] "iteration 305: pi = 0.280638198838846; lambda = 2.27358832325497; last change = 1.03907376285406e-05"
## [1] "iteration 306: pi = 0.280629067710228; lambda = 2.27357808652714; last change = 1.02367278285165e-05"
## [1] "iteration 307: pi = 0.280620072353348; lambda = 2.27356800152914; last change = 1.00849980007034e-05"
## [1] "iteration 308: pi = 0.280611210745487; lambda = 2.27355806601467; last change = 9.93551447248109e-06"
## [1] "iteration 309: pi = 0.280602480894176; lambda = 2.27354827777061; last change = 9.78824406416834e-06"
## [1] "iteration 310: pi = 0.280593880836742; lambda = 2.27353863461652; last change = 9.64315408902294e-06"
## [1] "iteration 311: pi = 0.280585408639856; lambda = 2.27352913440418; last change = 9.50021233592224e-06"
## [1] "iteration 312: pi = 0.280577062399092; lambda = 2.27351977501711; last change = 9.35938706980721e-06"
## [1] "iteration 313: pi = 0.280568840238494; lambda = 2.27351055437009; last change = 9.2206470219125e-06"
## [1] "iteration 314: pi = 0.280560740310143; lambda = 2.27350147040871; last change = 9.08396138266099e-06"
## [1] "iteration 315: pi = 0.280552760793741; lambda = 2.27349252110891; last change = 8.94929979766701e-06"
## [1] "iteration 316: pi = 0.280544899896188; lambda = 2.27348370447655; last change = 8.81663235619001e-06"
## [1] "iteration 317: pi = 0.28053715585118; lambda = 2.27347501854696; last change = 8.68592959157866e-06"
## [1] "iteration 318: pi = 0.280529526918802; lambda = 2.27346646138449; last change = 8.55716246572769e-06"
## [1] "iteration 319: pi = 0.280522011385129; lambda = 2.27345803108212; last change = 8.43030237263065e-06"
## [1] "iteration 320: pi = 0.280514607561842; lambda = 2.273449725761; last change = 8.30532112550131e-06"
## [1] "iteration 321: pi = 0.280507313785835; lambda = 2.27344154357004; last change = 8.18219095188866e-06"
## [1] "iteration 322: pi = 0.280500128418844; lambda = 2.27343348268556; last change = 8.06088448834785e-06"
## [1] "iteration 323: pi = 0.280493049847067; lambda = 2.27342554131078; last change = 7.94137477555523e-06"
## [1] "iteration 324: pi = 0.2804860764808; lambda = 2.27341771767553; last change = 7.82363525209107e-06"
## [1] "iteration 325: pi = 0.280479206754074; lambda = 2.27341001003579; last change = 7.70763974244915e-06"
## [1] "iteration 326: pi = 0.280472439124297; lambda = 2.27340241667332; last change = 7.59336246325404e-06"
## [1] "iteration 327: pi = 0.280465772071909; lambda = 2.27339493589531; last change = 7.48077800905023e-06"
## [1] "iteration 328: pi = 0.280459204100027; lambda = 2.27338756603397; last change = 7.3698613443085e-06"
## [1] "iteration 329: pi = 0.280452733734112; lambda = 2.27338030544616; last change = 7.26058780831096e-06"
## [1] "iteration 330: pi = 0.280446359521631; lambda = 2.27337315251306; last change = 7.1529331018283e-06"
## [1] "iteration 331: pi = 0.280440080031725; lambda = 2.27336610563978; last change = 7.04687328223486e-06"
## [1] "iteration 332: pi = 0.280433893854887; lambda = 2.27335916325502; last change = 6.9423847599559e-06"
## [1] "iteration 333: pi = 0.28042779960264; lambda = 2.27335232381072; last change = 6.83944429669125e-06"
## [1] "iteration 334: pi = 0.280421795907222; lambda = 2.27334558578173; last change = 6.73802899164855e-06"
## [1] "iteration 335: pi = 0.280415881421274; lambda = 2.27333894766544; last change = 6.63811628465183e-06"
## [1] "iteration 336: pi = 0.280410054817536; lambda = 2.27333240798149; last change = 6.53968394948024e-06"
## [1] "iteration 337: pi = 0.280404314788546; lambda = 2.27332596527141; last change = 6.44271008365394e-06"
## [1] "iteration 338: pi = 0.28039866004634; lambda = 2.2733196180983; last change = 6.34717311109867e-06"
## [1] "iteration 339: pi = 0.280393089322163; lambda = 2.27331336504653; last change = 6.25305177237578e-06"
## [1] "iteration 340: pi = 0.28038760136618; lambda = 2.27330720472141; last change = 6.16032512246178e-06"
## [1] "iteration 341: pi = 0.280382194947192; lambda = 2.27330113574888; last change = 6.06897252453109e-06"
## [1] "iteration 342: pi = 0.280376868852358; lambda = 2.27329515677523; last change = 5.97897364773559e-06"
## [1] "iteration 343: pi = 0.280371621886919; lambda = 2.27328926646677; last change = 5.89030845787875e-06"
## [1] "iteration 344: pi = 0.280366452873928; lambda = 2.27328346350955; last change = 5.80295722141244e-06"
## [1] "iteration 345: pi = 0.280361360653981; lambda = 2.27327774660906; last change = 5.71690049122608e-06"
## [1] "iteration 346: pi = 0.280356344084958; lambda = 2.27327211448995; last change = 5.63211911064343e-06"
## [1] "iteration 347: pi = 0.280351402041763; lambda = 2.27326656589575; last change = 5.54859420232034e-06"
## [1] "iteration 348: pi = 0.280346533416065; lambda = 2.27326109958858; last change = 5.46630717179752e-06"
## [1] "iteration 349: pi = 0.280341737116055; lambda = 2.27325571434888; last change = 5.38523969551008e-06"
## [1] "iteration 350: pi = 0.280337012066191; lambda = 2.27325040897516; last change = 5.30537372211981e-06"
## [1] "iteration 351: pi = 0.280332357206959; lambda = 2.27324518228369; last change = 5.22669146629795e-06"
## [1] "iteration 352: pi = 0.280327771494633; lambda = 2.27324003310829; last change = 5.14917540606064e-06"
## [1] "iteration 353: pi = 0.280323253901036; lambda = 2.27323496030001; last change = 5.07280827699574e-06"
## [1] "iteration 354: pi = 0.280318803413312; lambda = 2.27322996272694; last change = 4.99757307048654e-06"
## [1] "iteration 355: pi = 0.280314419033692; lambda = 2.27322503927391; last change = 4.92345302882669e-06"
## [1] "iteration 356: pi = 0.280310099779272; lambda = 2.27322018884227; last change = 4.85043164211163e-06"
## [1] "iteration 357: pi = 0.280305844681787; lambda = 2.27321541034963; last change = 4.77849264246544e-06"
## [1] "iteration 358: pi = 0.280301652787397; lambda = 2.27321070272962; last change = 4.7076200075935e-06"
## [1] "iteration 359: pi = 0.280297523156469; lambda = 2.27320606493168; last change = 4.63779794346308e-06"
## [1] "iteration 360: pi = 0.280293454863361; lambda = 2.27320149592078; last change = 4.56901089807005e-06"
## [1] "iteration 361: pi = 0.28028944699622; lambda = 2.27319699467724; last change = 4.50124354234305e-06"
## [1] "iteration 362: pi = 0.28028549865677; lambda = 2.27319256019646; last change = 4.4344807794694e-06"
## [1] "iteration 363: pi = 0.280281608960114; lambda = 2.27318819148873; last change = 4.36870772979603e-06"
## [1] "iteration 364: pi = 0.280277777034528; lambda = 2.27318388757899; last change = 4.3039097392672e-06"
## [1] "iteration 365: pi = 0.280274002021269; lambda = 2.27317964750662; last change = 4.24007236654589e-06"
## [1] "iteration 366: pi = 0.280270283074381; lambda = 2.27317547032524; last change = 4.17718138434608e-06"
## [1] "iteration 367: pi = 0.280266619360502; lambda = 2.27317135510246; last change = 4.11522277765641e-06"
## [1] "iteration 368: pi = 0.280263010058676; lambda = 2.27316730091972; last change = 4.05418273619063e-06"
## [1] "iteration 369: pi = 0.280259454360168; lambda = 2.27316330687207; last change = 3.99404765527578e-06"
## [1] "iteration 370: pi = 0.280255951468284; lambda = 2.27315937206794; last change = 3