Question: EM algo, EM alogrithm Complete data vector be a random sample from normal distribution. Suppose Y1 to Ym are observed. Supoose Ym+1 to Yn are

EM algo, EM alogrithm

Complete data vector be a random sample from normal distribution. Suppose Y1 to Ym are observed. Supoose Ym+1 to Yn are missing.

Suppose we can only observe m=15 observation: 1.85, 3.12, 7.20, 4.73, 6.09, 1.84, 3.33, 4.57, 1.28, -0.71, 1.42, -0.16, -1.90, 1.68, 1.85. The remaining n-m = 5 observations are missing. Find mean and variance using EM algoithm.

Can you suggest R codes?

EM.consoredexp<-function(init,x,cen,n,tol=1e-9,iter.max=100){ m<-length(x) t<-0 x.old<-init repeat{ x.new<-(sum(x)+(n-m)*(x.old+cen))/n t<-t+1 if((abs(x.new-x.old) return(list(est=x.new,iteration=t)) } if(t>iter.max){ cat("iteration limit has been reached ") break } x.old<-x.new } }

x<-c(1.85, 3.12, 7.20, 4.73, 6.09, 1.84, 3.33, 4.57, 1.28, -0.71, 1.42, -0.16, -1.90, 1.68, 1.85) cen<-5 EM.consoredexp(0.5,x,5,20)

y<-sapply(x, h.ind, t =5) est<-mean(y) est

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!