search for: s2yg2

Displaying 1 result from an estimated 1 matches for "s2yg2".

Did you mean: 2yg2
2009 Jan 25
1
Gibbs sampler...did it work?
...sampler itself? > s2eg2=1/rgamma(mg2,(12/2),.5*t(residuals(lm(yg[,1]~xg-1))%*%residuals(lm(yg[,1]~xg-1)))) > for(i in 1:mg2){ + s2yg[i,]=parsy+t(rnorm(1,mean=0,sd=s2ygscale[i])%*%chol(s2eg2[i]*xgtxgi)) + write(c(s2yg[i,],s2eg2[i]), + file="/media/DataTravelerMini/KINGSTON/Honours/R/IPR/s2yg2.txt", append=T, ncolumns=1) + if(i%%50==0){print(c(s2yg[i,],s2eg2[i]))}} I GET A BUNCH OF NUMBERS PRINTED HERE, THE OUTPUTTED VALUES WHICH ALSO APPEAR IN A TEXT FILE. I HIT ABOUT 2000 VALUES, THEN I GET THIS MESSAGE: Error in s2yg[i, ] = parsy + t(rnorm(1, mean = 0, sd = s2ygscale[i]) %*%...