search for: rtrunc

Displaying 2 results from an estimated 2 matches for "rtrunc".

Did you mean: trunc
2012 Mar 10
1
Draw values from multiple data sets as inputs to a Monte-Carlo function; then apply across entire matrix
...m the data tables I read in above. For example, 3.5 would be cell (i,j) in the Poultry MEAN density table; 0.108 would be cell (i,j) in the Poultry STDEV table; and 47 the single estimate for cell (i,j) of the Wild bird density table. Poultry <- mcstoc(rnorm, type="U", 3.5, 0.108, rtrunc=TRUE, linf=0) Wild <- mcstoc(rtriang, type="U", min=0, mode=47, max=75) Risk <- Poultry * Wild #this is the risk function the MC is applied to Questions: 1) How can I edit the Poultry and Wild variables above to read the data values directly from the 3 input tables (i.e.,...
2012 Mar 21
0
runif error - maximum limit?
Dear all, I am receiving the error below, I think because my n is exceeding the allowable limit for a vector. Can anyone confirm, and help with the following questions? The function and error: > stPte8 <- rtrunc(rnorm, nx * ny * nsimu, linf=0, mean=as.vector(PTmn), > sd=as.vector(PTsd)) Error in runif(n, min = pinf, max = psup) : invalid arguments My total n is calculated by: nx=4053, ny=4848, nsimu=1000, n = nx*ny*nsimu = 19,648,994,000 I believe the maximum size of a vector is 2^31-1 (2,147,483,647)...