Displaying 3 results from an estimated 3 matches for "betabar".
2005 May 19
1
R 2.1.0 RH Linux Built from Source Segmentation Fault
...list(R=1,keep=1,s=scale)
> for (j in 1:R)
+ {
+ itime=proc.time()[3]
+ for (i in 1:nphy){
+ # for each physician i draw a beta[i] using MH algorithm
+ #
+ Data=list(m=nalt,X=X[rowx1[i]:rowx2[i],],y=Y[rowy1[i]:rowy2[i],])
+ bbar=t(theta)%*%z[i,]
+ prior=list(A=delta,betabar=bbar)
+ a=rmnlRwMetrop1(Data,prior,Mcmc=parameters,beta[i,])
+ beta[i,]=a$betadraw
+ accept[i]=a$acceptr
+ }
+ mregout=rmultireg(beta,z,thetabar,A1,nu1,V)
+ delta=mregout$Sigma
+ theta=mregout$B
+ if (j%%keep==0){
+ thetas[j/keep,]=as.vector(theta)
+ betastore[j/keep]=list(b...
2006 Feb 08
0
bayesm, rmnlIndepMetrop
...meric(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(bhat,dim=c(nvar))
A=diag(c(rep(.01,length(beta))));
betabar=rep(0,length(beta))
Data=list(y=y,X=X,p=p);
Mcmc=list(R=R,keep=1) ;
Prior=list(A=A,betabar=betabar)
out=rmnlIndepMetrop(Data=Data,Prior=Prior,Mcmc=Mcmc)
Ouput:
Starting Independence Metropolis Sampler for Multinomial Logit Model
with 4 alternatives
Prior Parms:
betabar
[1] 0 0...
2011 Dec 26
1
regarding QRb() function
Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing =
decreasing)) : undefined columns selected during the execution of
following r sequence of commands
X<-subset(data,select=c(V1,V2,V3,V4,V5,V6,V7,V8,V9))
y<-subset(data,selcet=10)
Data = list(y=y, X=X, p=.75)
Prior = list(betabar=c(rep(0,ncol(X))),A=.01*diag(ncol(X)))
Mcmc = list(R=100000, keep=10, step=.2)
out <- QRb(Data=Data, Prior=Prior, Mcmc=Mcmc)
here data is of 60 records and 10 attributes. V1,...V9 are input values and
V10 is response variable.
--
View this message in context: http://r.789695.n4.nabble.com/rega...