search for: mu5

Displaying 3 results from an estimated 3 matches for "mu5".

Did you mean: md5
2009 Oct 31
1
Help me improving my code
...gt; fw <- factor(wage) > Ik <- model.matrix(~fw-1) > I1 <- Ik[,1] > I2 <- Ik[,2] > I3 <- Ik[,3] > I4 <- Ik[,4] > I5 <- Ik[,5] > yelmon <- function(theta,x){ + mu1 <- theta[1] + mu2 <- theta[2] + mu3 <- theta[3] + mu4 <- theta[4] + mu5 <- theta[5] + beta <- theta[6] + logL <- sum((Ik*log((exp(mu2-(x*beta))/(1+exp(mu2-(x*beta))))-(exp(mu1-(x*beta))/(1+exp(mu1-(x*beta))))))+(Ik*log((exp(mu3-(x*beta))/(1+exp(mu3-(x*beta))))-(exp(mu2-(x*beta))/(1+exp(mu2-(x*beta))))))+(Ik*log((exp(mu4-(x*beta))/(1+exp(mu4-(x*beta))))-(exp(...
2010 Mar 20
2
EM algorithm in R
Please help me in writing the R code for this problem. I've been solving this for 4 days. It was hard for me to solve it. It's a simulation problem in R. The problem is My true model is a normal mixture which is given as 0.5 N(-0.8,1) + 0.5 N(0.8,1). This model has two components. I will get a random sample of size 100 from this model. I will do this 300 times. That means, I will have
2011 Feb 04
0
MSBVAR and hc.forecast
...1,2.1,3.1,100.1) b = c(1.1,1.1,1.1,100.1,1.1,1.1,1.1,100.1,1.1,1.1,1.,100.1,1.1,1.1,1.1,100.1,1.1,1.1,1.1,100.1,1.1,1.1,1.,100.1) K <-ts(cbind(a,b),start=c(1.1,1.1), names=c("a","b")) fit.bvar <- szbvar(K, p = 1, lambda0=0.6, lambda=0.1, lambda3=2, lambda4=0.25,lambda5=0,mu5=0, mu6=0, prior=0) y <- matrix(c(rep(0,8),c(1.10,1.10,1.10,100.1,1.10,1.10,1.0,100.10)),ncol=2) h <- hc.forecast(fit.bvar,y,nsteps=8,burnin=300, gibbs=500,exog=NULL)