On 11-11-10 1:28 PM, Gyanendra Pokharel wrote:
I have the following code,
gibbs<-function(m,theta = 0.25, lambda =0.55, n =1){
alpha<- 1.5
beta<- 1.5
gamma<- 1.5
x<- array(0,c(m+1, 3))
x[1,1]<- theta
x[1,2]<- lambda
x[1,3]<- n
for(t in 2:(m+1)){
x[
I have the following code,
gibbs <-function(m,theta = 0.25, lambda =0.55, n =1){
alpha <- 1.5
beta <- 1.5
gamma <- 1.5
x<- array(0,c(m+1, 3))
x[1,1] <- theta
x[1,2] <- lambda
x[1,3]<- n
for(t in 2:(m+1)){
x[t,1] <- rbinom(1, x[t-1,3], x[t-1,1])
x[t,2]
It is not that you are out of memory; one of your two 's2yg' objects
is not large enough (improperly dimensioned?) so you get the subscript
error. You can put the following in your script to catch the error
and then examine the values:
options(error=utils::recover)
On Sun, Jan 25, 2009 at 6:25
I am writing a Gibbs sampler. I think it is outputting some of what I want,
in that I am getting vector of several thousand values (but not 10,000) in a
txt file at the end.
My question is, is the error message (see below) telling me that it can't
output 10,000 values (draws) because of a limitat
4 matches
Mail list logo