Displaying 2 results from an estimated 2 matches for "todmax".
Did you mean:
modmax
2008 Aug 19
0
R-code: for those who like a challenge; HELP
...in Sub Saharan Africa. I have 50 surveys with
- crude mortality rate (cmr), CMR lower confidence interval(cmrlci), CMR upper confidence interval(cmruci),
- recall period minimum and recall period maximum (recallmin, recallmax)
- time of displacement mimimum and time of displacement maximum (todmin, todmax)
- population data at time of survey and proportion of population present in camp over time of displacement (data[9] - data[170])
Because of the uncertainty in these variables I am using the Monte Carlo method with e.g. 10,000 iterations and am writing a function that can run through each of the 5...
2008 Aug 16
0
use of all row elements
...with generating x.
## Generating random time or x coordinate (through random time of displacement - random recall)
## First generating random time within recall period
randomrecall<-round(runif(n=1,min=recallmin,max=recallmax))
## Second generating random time of displacement
todrange<-todmax-todminrandomtod<-0for(i in 1:todrange){if (proprand>data[[9+i]] & proprand<=data[[10+i]]) randomtod=i}
Following messages are given:
Warning messages:1: In 1:todrange : numerical expression has 50 elements: only the first used2: In if (proprand > data[[9 + i]] & proprand &l...