I don't think we have enough information to help you with this. Do you intent the simulated values for growthrate to be selected from the values in daT$growthrate? Or do these values define a distribution of values (perhaps ranging between 0 and 1) and the simulation should use that empirical distribution? In that case any value of growthrate in the range of 0 and 1 inclusive is possible.
What is the sample size of the 9999 Monte Carlo simulations? This will have a major effect on the ranges since as the sample size increases the range will be closer and closer to the range of the growthrate (0 to 1 for condition 3 and 0 to .5 for condition 1). In your example of no constraints on food (condition 2), if the growthrate is always 1, the range will always be 1 and 1. ------------------------------------- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kristi Glover Sent: Wednesday, April 20, 2016 1:06 AM To: R-help Subject: [R] simulation in R I realized that there was a typo error. I mean "Monte Carlo Simulation" ________________________________________ From: R-help <r-help-boun...@r-project.org> on behalf of Kristi Glover <kristi.glo...@hotmail.com> Sent: April 19, 2016 11:48 PM To: R-help Subject: [R] simulation in R Hi R user, Would you mind to help me to find the range with stochastic events? For example, daT<-structure(list(sn = 1:14, growthrate = c(0.5, 0.6, 0.7, 0.99, 0.1, 0.3, 0.4, 0.5, 0.5, 0.2, 0.1, 0.4, 0.3, 0.43)), .Names = c("sn", "growthrate"), class = "data.frame", row.names = c(NA, -14L)) I want to find the ranges of growth rate of the above data using Mote corle simulation (9999 times) under three conditions: 1. very drought ( in that condition growth will not be more than 0.5). [what would be the range (max, min ) of the growth rate for this scenario) 2. no constraints of food (growth will be 1 or 100%) (what would be the range (max,min) of growth rate in this scenario?). 3. Control (as it is) (Range??, max.min) I tried to find whether some one had same problem but I could not find it, is it too complicated to write the code in R for this example? your help will be highly appreciated. Sincerely, KG [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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 -- To UNSUBSCRIBE and more, see 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 -- To UNSUBSCRIBE and more, see 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.