Augusto.Sanabria at ga.gov.au
2008-Mar-04 01:24 UTC
[R] simulation study using R [SEC=UNCLASSIFIED]
Davood, I developed an MC simulation model for wind hazard analysis last year. I found three important issues to increase efficiency: 1) Reuse most variables in each loop 2) Write results (1000 stats) to external files, perhaps one file for each condition. (a good ID for each file can be implemented using "paste") 3) Develop a function to process the results stored in the external files. This is done once the simulation has finished. Hope it helps, Augusto -------------------------------------------- Augusto Sanabria. MSc, PhD. Mathematical Modeller Risk & Impact Analysis Group Geospatial & Earth Monitoring Division Geoscience Australia (www.ga.gov.au) Cnr. Jerrabomberra Av. & Hindmarsh Dr. Symonston ACT 2601 Ph. (02) 6249-9155 -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Davood Tofighi Sent: Tuesday, 4 March 2008 11:06 To: r-help at r-project.org Subject: [R] simulation study using R Dear All, I am running a Monte Carlo simulation study and have some questions on how to manage data storage efficiently at the end of each 1000 replication loop. I have three conditions coded using the FOR {} loops and a FOR loop that generates data for each condition, performs analysis, and computes a statistic 1000 times. Therefore, for each condition, I will have 1000 statistic values. My question is what's the best way to store the 1000 statistic for each condition. Any suggestion on how to manage such simulation studies is greatly appreciated. Thanks, -- Davood Tofighi Department of Psychology Arizona State University [[alternative HTML version deleted]] ______________________________________________ R-help at 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.