Re: [R] R to winbugs interface

2012-07-10 Thread Uwe Ligges



On 09.07.2012 19:27, PRAGYA SUR wrote:

Yes that was the problem. Thank you very much. Can anyone tell me the
meaning of
The following object(s) are masked _by_ '.GlobalEnv':

 beta



It means you have two instances of "beta", one in your workspace 
('.GlobalEnv') and one that is probably in some data.frame that was 
attached to the search path.


Best,
Uwe Ligges



i was shown this notification after the results were printed.

On Mon, Jul 9, 2012 at 1:15 PM, Uwe Ligges
mailto:lig...@statistik.tu-dortmund.de>> wrote:



On 09.07.2012 18:19, PRAGYA SUR wrote:

I ran the same program in a different computer where it had run
proper a
week ago. This time around in the log file in WinBUGS the
program stopped
at a line which said :
save(C:/DOCUME~1/ADMINI~1/__LOCALS~1/Temp/RtmpU3u46p/log.__odc)
save(C:/DOCUME~1/ADMINI~1/__LOCALS~1/Temp/RtmpU3u46p/log.__txt)
and did not proceed any further.
Can anyone tell me what migh tbe the possible error here?


Although unstated, I guess it was finished and did not close because
you used bugs(., debug=TRUE)?

Uwe Ligges


On Mon, Jul 9, 2012 at 7:04 AM, S Ellison
mailto:s.elli...@lgcgroup.com>> wrote:



-Original Message-
Error in file(con, "wb") : cannot open the connection In
addition: Warning messages:
1: In file.create(to[okay]) :
cannot create file 'c:/Program
Files/WinBUGS14//System/Rsrc/__Registry_Rsave.odc', reason
'Permission denied'


This tells you that you do not have operating system
permission to create
a file in the program files area referred to.

2: In file(con, "wb") :
cannot open file 'c:/Program
Files/WinBUGS14//System/Rsrc/__Registry.odc':
Permission denied


.. and this tells you you don't have permission to open a
file for writing
(mode 'w' in the same location

Conclusion; you're trying to write to an area you don;t have
permission to
write to.

Either change the permissions for that area (insecure) or
use a different
file location for temporary files.


**__**__***
This email and any attachments are confidential. Any
u...{{dropped:11}}



R-help@r-project.org  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.





__
R-help@r-project.org 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.


Re: [R] R to winbugs interface

2012-07-09 Thread PRAGYA SUR
Yes that was the problem. Thank you very much. Can anyone tell me the
meaning of
The following object(s) are masked _by_ '.GlobalEnv':

beta
i was shown this notification after the results were printed.

On Mon, Jul 9, 2012 at 1:15 PM, Uwe Ligges
wrote:

>
>
> On 09.07.2012 18:19, PRAGYA SUR wrote:
>
>> I ran the same program in a different computer where it had run proper a
>> week ago. This time around in the log file in WinBUGS the program stopped
>> at a line which said :
>> save(C:/DOCUME~1/ADMINI~1/**LOCALS~1/Temp/RtmpU3u46p/log.**odc)
>> save(C:/DOCUME~1/ADMINI~1/**LOCALS~1/Temp/RtmpU3u46p/log.**txt)
>> and did not proceed any further.
>> Can anyone tell me what migh tbe the possible error here?
>>
>
> Although unstated, I guess it was finished and did not close because you
> used bugs(., debug=TRUE)?
>
> Uwe Ligges
>
>
>> On Mon, Jul 9, 2012 at 7:04 AM, S Ellison  wrote:
>>
>>
>>>
>>>  -Original Message-
 Error in file(con, "wb") : cannot open the connection In
 addition: Warning messages:
 1: In file.create(to[okay]) :
cannot create file 'c:/Program
 Files/WinBUGS14//System/Rsrc/**Registry_Rsave.odc', reason
 'Permission denied'

>>>
>>> This tells you that you do not have operating system permission to create
>>> a file in the program files area referred to.
>>>
>>>  2: In file(con, "wb") :
cannot open file 'c:/Program
 Files/WinBUGS14//System/Rsrc/**Registry.odc':
 Permission denied

>>>
>>> .. and this tells you you don't have permission to open a file for
>>> writing
>>> (mode 'w' in the same location
>>>
>>> Conclusion; you're trying to write to an area you don;t have permission
>>> to
>>> write to.
>>>
>>> Either change the permissions for that area (insecure) or use a different
>>> file location for temporary files.
>>>
>>> ***
>>> This email and any attachments are confidential. Any u...{{dropped:11}}
>>>
>>
>> __**
>> R-help@r-project.org 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.
>>
>>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] R to winbugs interface

2012-07-09 Thread Uwe Ligges



On 09.07.2012 18:19, PRAGYA SUR wrote:

I ran the same program in a different computer where it had run proper a
week ago. This time around in the log file in WinBUGS the program stopped
at a line which said :
save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.odc)
save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.txt)
and did not proceed any further.
Can anyone tell me what migh tbe the possible error here?


Although unstated, I guess it was finished and did not close because you 
used bugs(., debug=TRUE)?


Uwe Ligges



On Mon, Jul 9, 2012 at 7:04 AM, S Ellison  wrote:





-Original Message-
Error in file(con, "wb") : cannot open the connection In
addition: Warning messages:
1: In file.create(to[okay]) :
   cannot create file 'c:/Program
Files/WinBUGS14//System/Rsrc/Registry_Rsave.odc', reason
'Permission denied'


This tells you that you do not have operating system permission to create
a file in the program files area referred to.


2: In file(con, "wb") :
   cannot open file 'c:/Program
Files/WinBUGS14//System/Rsrc/Registry.odc':
Permission denied


.. and this tells you you don't have permission to open a file for writing
(mode 'w' in the same location

Conclusion; you're trying to write to an area you don;t have permission to
write to.

Either change the permissions for that area (insecure) or use a different
file location for temporary files.

***
This email and any attachments are confidential. Any u...{{dropped:11}}


__
R-help@r-project.org 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.



__
R-help@r-project.org 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.


Re: [R] R to winbugs interface

2012-07-09 Thread PRAGYA SUR
I ran the same program in a different computer where it had run proper a
week ago. This time around in the log file in WinBUGS the program stopped
at a line which said :
save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.odc)
save(C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/RtmpU3u46p/log.txt)
and did not proceed any further.
Can anyone tell me what migh tbe the possible error here?

On Mon, Jul 9, 2012 at 7:04 AM, S Ellison  wrote:

>
>
> > -Original Message-
> > Error in file(con, "wb") : cannot open the connection In
> > addition: Warning messages:
> > 1: In file.create(to[okay]) :
> >   cannot create file 'c:/Program
> > Files/WinBUGS14//System/Rsrc/Registry_Rsave.odc', reason
> > 'Permission denied'
>
> This tells you that you do not have operating system permission to create
> a file in the program files area referred to.
>
> > 2: In file(con, "wb") :
> >   cannot open file 'c:/Program
> > Files/WinBUGS14//System/Rsrc/Registry.odc':
> > Permission denied
>
> .. and this tells you you don't have permission to open a file for writing
> (mode 'w' in the same location
>
> Conclusion; you're trying to write to an area you don;t have permission to
> write to.
>
> Either change the permissions for that area (insecure) or use a different
> file location for temporary files.
>
> ***
> This email and any attachments are confidential. Any u...{{dropped:11}}

__
R-help@r-project.org 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.


Re: [R] R to winbugs interface

2012-07-09 Thread S Ellison
 

> -Original Message-
> Error in file(con, "wb") : cannot open the connection In 
> addition: Warning messages:
> 1: In file.create(to[okay]) :
>   cannot create file 'c:/Program
> Files/WinBUGS14//System/Rsrc/Registry_Rsave.odc', reason 
> 'Permission denied'

This tells you that you do not have operating system permission to create a 
file in the program files area referred to.

> 2: In file(con, "wb") :
>   cannot open file 'c:/Program 
> Files/WinBUGS14//System/Rsrc/Registry.odc':
> Permission denied

.. and this tells you you don't have permission to open a file for writing 
(mode 'w' in the same location

Conclusion; you're trying to write to an area you don;t have permission to 
write to.

Either change the permissions for that area (insecure) or use a different file 
location for temporary files.

***
This email and any attachments are confidential. Any use...{{dropped:8}}

__
R-help@r-project.org 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.


[R] R to winbugs interface

2012-07-09 Thread PRAGYA SUR
Hello everyone,
  I need some help regarding calling WinBUGS from R. I
have a model for WinBUGS and an R code which calls WinBUGS. On running the
code I am being shown the error message :
Error in file(con, "wb") : cannot open the connection
In addition: Warning messages:
1: In file.create(to[okay]) :
  cannot create file 'c:/Program
Files/WinBUGS14//System/Rsrc/Registry_Rsave.odc', reason 'Permission denied'
2: In file(con, "wb") :
  cannot open file 'c:/Program Files/WinBUGS14//System/Rsrc/Registry.odc':
Permission denied
In addition in WinBUGS a window crops up which is named black box. and says
trap #060 and then gives some details. I am not being able to understand
what all hese error messages mean. I am also giving the R code and the code
for the model here :

R code :
regpractwo=function(Ytilde,D,Xtilde,a,b,n,FEV,Age,Smoke)
{
Xtildeinv=solve(Xtilde)
beta0=c(t(Xtildeinv%*%Ytilde))
C0=Xtildeinv%*%D%*%t(Xtildeinv)
C0inv=solve(C0)
r=dim(Xtildeinv)[1]
FEVdataBUGS=list("n","r","beta0","C0inv","a","b","FEV","Age","Smoke")
#creates list of imputs for winbugs code
parameters=c("beta","tau","meanFEVs","meanFEVns","FEV20s","FEV20ns")
#parameters to be monitored by winbugs
inits=list(list(tau=1,beta=c(0,0,0,0),FEV20s=2,FEV20ns=2)) # giving initial
values
FEV.fit=bugs(FEVdataBUGS,inits,parameters,"FEVWBModel.txt",n.chains=1,n.iter=6,n.thin=1,n.burnin=1)
print(FEV.fit,digits=3)
attach.bugs(FEV.fit)
}

The model :

model
{
for (i in 1:n)
{
FEV[i]~dnorm(mu[i],tau)
mu[i]<-beta[1]+beta[2]*Age[i]+beta[3]*Smoke[i]+beta[4]*Age[i]*Smoke[i]
}
beta[1:r]~dmnorm(beta0[1:r],C0inv[1:r,1:r])
tau~dgamma(a,b)
for (i in 1:10)
{
meanFEVs[i] <-  beta[1] + (beta[2]+beta[4])*(i+9) + beta[3]
   meanFEVns[i] <-  beta[1] + beta[2]*(i+9)
  }
FEV20s ~ dnorm(mu20s,tau)
FEV20ns ~ dnorm(mu20ns,tau)
mu20s <-  beta[1] + (beta[2]+beta[4])*20 + beta[3]
mu20ns <-  beta[1] + beta[2]*20
}

Please help me with this problem.

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.