Displaying 3 results from an estimated 3 matches for "rho0".
Did you mean:
rho
2004 Oct 16
7
sapply and loop
Dear all,
I am doing 200 times simulation. For each time, I generate a matrix and
define some function on this matrix to get a 6 dimension vector as my
results.
As the loop should be slow, I generate 200 matrice first, and save them into
a list named ma,
then I define zz<-sapply(ma, myfunction)
To my surprise, It almost costs me the same time to get my results if I
directly use a loop
2004 Oct 16
7
sapply and loop
Dear all,
I am doing 200 times simulation. For each time, I generate a matrix and
define some function on this matrix to get a 6 dimension vector as my
results.
As the loop should be slow, I generate 200 matrice first, and save them into
a list named ma,
then I define zz<-sapply(ma, myfunction)
To my surprise, It almost costs me the same time to get my results if I
directly use a loop
2012 Jan 23
1
Jags problem
...met "Non-conforming parameters for function %*%" problem, when I run the
Jags model in R.
My model is like this:
model{
for(i in 1:n){
for(j in 1:t[i]){
et[i,j]<-yt[i,j]-beta0+betax*xt[i,j]+betat*t[i,j]
}
for(a in 1:t[i]){
for(b in 1:t[i]){
sigma[i,a,b]<-pow(rho0,abs(t[a]-t[b]))
}
}
phi[i]<- -log(exp(-(et[i,1:t[i]])%*%inverse(sigma[i,
1:t[i],1:t[i]])%*%t(et[i,1:t[i]])))+10000
zeros[i]~dpois(phi[i])
}
beta0~dnorm(0,1)
betat~dnorm(0,1)
betax~dnorm(4,1)
rho0~dunif(0,1)
}
Does anybody know what the problem is? Thank you.
Sophie...