Dear Anamika Chaudhuri
BRugs is most convenient and faster when looping through dataframes using
something like:
for (i in 1:n]){
.....
data1<-data[i,]
"run BRugs" with data1
....
result1<-result1[i:j,] #BRugs output in another dataframe
....
}
I have some code bits you may look at as an example in case you are interested ?
Just as an idea to get started.
You will have to modify the code to your needs and data structure
It is a bit complex. You have to define an empty dataframe for the results etc. format the data
to put into BRugs etc.
BRugs has a reputation of not being as stable in the "sampling". This is probably not true
and as it depends on the model. In case the convergence is poor WinBugs should be tried also.
It fun when it works, but i may take som time (late evenings)!
Greetings Ram. Næstved Hospital, Region Sjælland, Denmark.
-----Oprindelig meddelelse-----
Fra: (The BUGS software mailing list) [mailto:[log in to unmask]] På vegne af BXC (Bendix Carstensen)
Sendt: 14. april 2010 10:39
Til: [log in to unmask]
Emne: Re: [BUGS] Automation of WinBUGS
The easiest thing is presumably to use the interface through R,
the R2WinBUGS package. You might even want to use the BRugs
interface to the OpenBUGS implementation of BUGS.
b.r.
Bendix Carstensen
> -----Original Message-----
> From: (The BUGS software mailing list)
> [mailto:[log in to unmask]] On Behalf Of Anamika Chaudhuri
> Sent: 13. april 2010 22:13
> To: [log in to unmask]
> Subject: Automation of WinBUGS
>
> Is there a way we can automate WINBUGS to run 100 simulated
> datasets with the same model without having to call in each
> dataset at a time and run the model?
>
> -------------------------------------------------------------------
> This list is for discussion of modelling issues and the BUGS software.
> For help with crashes and error messages, first mail
> [log in to unmask] To mail the BUGS list, mail to
> [log in to unmask] Before mailing, please check the archive
> at www.jiscmail.ac.uk/lists/bugs.html
> Please do not mail attachments to the list.
> To leave the BUGS list, send LEAVE BUGS to
> [log in to unmask] If this fails, mail
> [log in to unmask], NOT the whole list
>
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|