search for: x_metrop

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

Did you mean: metrop
2006 Feb 08
0
bayesm, rmnlIndepMetrop
Hi, I tried to use rmnlIndepMetrop (bayesm package) for my MNL model with 4 choice alternatives, 5 independent variables, 69 observations, dim(X) [1] 276 5, nu=6. So I run such code: if(nchar(Sys.getenv("LONG_TEST")) != 0) {R=2000} else {R=10} set.seed(66) df=read.table("X_metrop.dat",header=TRUE) inp=as.matrix(df) y=as.numeric(inp[,1]) n=length(y) p=4 nvar=ncol(X) X=cbind(1,inp[,2:5]) XTXI=chol2inv(chol(crossprod(X))) bhat=XTXI%*%t(X)%*%y #create X matrix with dim nobs*p x nvar index=1:n index2=rep(index,p) index3=sort(index2) X=X[index3,] beta=array(bha...