.Random.seed not found

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

.Random.seed not found

Wilkerson, Sylvia (NIH/CIT) [E]
Hi All,

I have a user who is receiving this error after running the following:

library(rjags)
library(R2jags)
x = c(1.6907, 1.7242, 1.7552, 1.7842, 1.8113, 1.8369, 1.8610, 1.8839)
n = c(59, 60, 62, 56, 63, 59, 62, 60)
r = c(6, 13, 18, 28, 52, 53, 61, 60)
N = 8
data=list("x","n","r","N")
inits=function(){
list(alpha.star=0,beta=0)
}
parameters=c("alpha","beta","rhat")
result=jags(data,inits,model.file="test.bug",parameters,n.chains=3,n.iter=10000,n.burnin=1000,n.thin=1)

module glm loaded
Error: object '.Random.seed not found


I don't think it has anything to do with rjags or R2jags because when I run the
same code on the same system, I receive no error messages.

The R version is 2.14.0 on a Linux 64 machine.

Any help would be appreciated.

Sylvia Wilkerson



        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: .Random.seed not found

plangfelder
You need to use set.seed() or one of the random number generators to
have .Random.seed defined. Also, if you load a previously saved
workspace and that workspace had a .Random.seed defined, you will have
it defined.

HTH

Peter

On Tue, Feb 7, 2012 at 9:58 AM, Wilkerson, Sylvia (NIH/CIT) [E]
<[hidden email]> wrote:

> Hi All,
>
> I have a user who is receiving this error after running the following:
>
> library(rjags)
> library(R2jags)
> x = c(1.6907, 1.7242, 1.7552, 1.7842, 1.8113, 1.8369, 1.8610, 1.8839)
> n = c(59, 60, 62, 56, 63, 59, 62, 60)
> r = c(6, 13, 18, 28, 52, 53, 61, 60)
> N = 8
> data=list("x","n","r","N")
> inits=function(){
> list(alpha.star=0,beta=0)
> }
> parameters=c("alpha","beta","rhat")
> result=jags(data,inits,model.file="test.bug",parameters,n.chains=3,n.iter=10000,n.burnin=1000,n.thin=1)
>
> module glm loaded
> Error: object '.Random.seed not found
>
>
> I don't think it has anything to do with rjags or R2jags because when I run the
> same code on the same system, I receive no error messages.
>
> The R version is 2.14.0 on a Linux 64 machine.
>
> Any help would be appreciated.
>
> Sylvia Wilkerson
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: .Random.seed not found

Wilkerson, Sylvia (NIH/CIT) [E]
Thanks you Peter,

It works perfectly.

Sylvia


-----Original Message-----
From: Peter Langfelder [mailto:[hidden email]]
Sent: Tuesday, February 07, 2012 1:59 PM
To: Wilkerson, Sylvia (NIH/CIT) [E]
Cc: [hidden email]
Subject: Re: [R] .Random.seed not found

You need to use set.seed() or one of the random number generators to have .Random.seed defined. Also, if you load a previously saved workspace and that workspace had a .Random.seed defined, you will have it defined.

HTH

Peter

On Tue, Feb 7, 2012 at 9:58 AM, Wilkerson, Sylvia (NIH/CIT) [E] <[hidden email]> wrote:

> Hi All,
>
> I have a user who is receiving this error after running the following:
>
> library(rjags)
> library(R2jags)
> x = c(1.6907, 1.7242, 1.7552, 1.7842, 1.8113, 1.8369, 1.8610, 1.8839)
> n = c(59, 60, 62, 56, 63, 59, 62, 60) r = c(6, 13, 18, 28, 52, 53, 61,
> 60) N = 8
> data=list("x","n","r","N")
> inits=function(){
> list(alpha.star=0,beta=0)
> }
> parameters=c("alpha","beta","rhat")
> result=jags(data,inits,model.file="test.bug",parameters,n.chains=3,n.i
> ter=10000,n.burnin=1000,n.thin=1)
>
> module glm loaded
> Error: object '.Random.seed not found
>
>
> I don't think it has anything to do with rjags or R2jags because when
> I run the same code on the same system, I receive no error messages.
>
> The R version is 2.14.0 on a Linux 64 machine.
>
> Any help would be appreciated.
>
> Sylvia Wilkerson
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.