Skip to content
Prev 65313 / 398502 Next

Rounding parameter values in genoud(), Rgenoud package

Hi Scott,
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 at harvard.edu
http://jsekhon.fas.harvard.edu/
Office: 617.496.2426 Fax: 617.507.5524
======================================