[R] Optimization in R similar to MS Excel Solver

Berend Hasselman bhh at xs4all.nl
Sat Oct 27 11:04:39 CEST 2012


On 26-10-2012, at 21:41, Richard James wrote:

> 
> That solution works very well. 
> 
> The only issue is that 'rnorm' occasionally generates negative values which
> aren't logical in this situation. 
> 

Try another random generator.
Lognormal, uniform, ...

> Is there a way to set a lower limit of zero?

Truncated normal perhaps?

Berend




More information about the R-help mailing list