[R] Rounding parameter values in genoud(), Rgenoud package

From: Jasjeet Sekhon <jsekhon_at_fas.harvard.edu>
Date: Thu 03 Mar 2005 - 17:27:22 EST

Hi Scott,

> I would like genoud to internally limit parameters to 4 decimal
> places as shown in this output.

Thanks for the question. I don't know what your application is but you may want to use the integer datatype (data.type.int=TRUE) and then rescale the parameters in your function to provide the decimal resolution you would like. For example, set the genoud bounds so a given parameter can range from -1,000,000 to 1,000,000 but in your fit function divide the parameter by 10,000 so it actually ranges from -100 to 100 and allows for four decimal places. Judging from the numbers you have printed, you could probably get away with the genoud range being just -100,000 to 100,000 etc.

For example, set the "default.domains=100,000" or use the Domains option to set individual parameter specific bounds; set "data.type.int=TRUE"; and in your fit function:

FitFunction <- function(PARMS)
  {
    PARMS <- PARMS/10000
    [....your code....]
  }

Cheers, Jas.



Jasjeet S. Sekhon
Associate Professor
Harvard University
Institute for Quantitative
  Social Science
jasjeet_sekhon@harvard.edu
http://jsekhon.fas.harvard.edu/
Office: 617.496.2426 Fax: 617.507.5524

> From: "Waichler, Scott R" <Scott.Waichler@pnl.gov>
> Date: March 2, 2005 1:01:01 PM CST
> To: r-help@stat.math.ethz.ch
> Subject: [R] Rounding parameter values in genoud(), Rgenoud package
>
>
> I would like to limit the significant figures of the calibrated
> parameters determined by genoud() in the Rgenoud package. Below is
> some
> example output, where column 1 is model run number, columns 2-7 are the
> parameter values, and columns 8-12 are model fit statistics. I would
> like genoud to internally limit parameters to 4 decimal places as shown
> in this output. It is clear that the function is generating many
> parameter sets that are identical after rounding. Can I impose
> rounding
> on the function and thereby lessen processing time? The only function
> argument that seems related is the solution.tolerance, but this is not
> for the parameter values.
>
> Run par1 par2 par3 par4 par5 par6 Bias MAE
> R2 E2 E1'
> 507 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 508 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 509 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 510 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 511 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 512 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 513 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 514 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 515 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
> 516 0.0239 0.0219 0.0267 0.0274 0.0283 0.0245 -0.0112 0.0804 0.9994
> 0.9994 0.9792
>
> Thanks,
> Scott Waichler
> Senior Research Scientist
> Pacific Northwest National Laboratory
> Richland, WA USA
> scott.waichler@pnl.gov
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Mar 03 17:49:47 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:40 EST