Specify arguments for PCMFit during calls to PCMFitMixed.

DefaultArgsConfigOptim(
  matParInit = NULL,
  argsPCMParamLowerLimit = NULL,
  argsPCMParamUpperLimit = NULL,
  numRunifInitVecParams = 1000,
  numGuessInitVecParams = 100,
  numJitterRootRegimeFit = 100,
  sdJitterRootRegimeFit = 0.5,
  numJitterAllRegimeFits = 100,
  sdJitterAllRegimeFits = 0.5,
  numCallsOptim = 10,
  control = list(fnscale = -1)
)

Arguments

matParInit

a matrix of any number of rows and p columns where, p is the number of variable numerical parameters in the model (equal to PCMParamCount(model)). Each row of this matrix specifies a suggested starting location for the optim L-BFGS-B run. Default: NULL, meaning that the initial parameters are to be chosen at random and/or using calls to GuessInitVecParams function.

argsPCMParamLowerLimit

named lists with arguments passed to the functions PCMParamLowerLimit and PCMParamUpperLimit, respectively. Default: NULL.

argsPCMParamUpperLimit

named lists with arguments passed to the functions PCMParamLowerLimit and PCMParamUpperLimit, respectively. Default: NULL.

numRunifInitVecParams

integers specifying how many parameter vectors should be drawn from a uniform distribution between PCMParamLowerLimit(model) and PCMParamUpplerLimit(model), and how many parameter vectors should be generated by jittering the resulting vector from a call to GuessInitVecParams. Before starting the optimization the model likelihood is evaluated at each of these vectors and the top numCallsOptim vectors are chosen for starting locations for optimization. The default settings are numRunifInitVecParams = if( is.null(matParInit) ) 1000L else 0L and numGuessInitVecParams = if( is.null(matParInit) ) 100L else 0L.

numGuessInitVecParams

integers specifying how many parameter vectors should be drawn from a uniform distribution between PCMParamLowerLimit(model) and PCMParamUpplerLimit(model), and how many parameter vectors should be generated by jittering the resulting vector from a call to GuessInitVecParams. Before starting the optimization the model likelihood is evaluated at each of these vectors and the top numCallsOptim vectors are chosen for starting locations for optimization. The default settings are numRunifInitVecParams = if( is.null(matParInit) ) 1000L else 0L and numGuessInitVecParams = if( is.null(matParInit) ) 100L else 0L.

numJitterRootRegimeFit

integers specifying how many initial parameter vectors should be generated by 'jittering' the parameters of the root regime of a previously found fit (such as a clade-fit), and by jittering all regime parameters. Default: 100.

sdJitterRootRegimeFit

white noise standard deviation. Default: 0.5.

numJitterAllRegimeFits

integers specifying how many initial parameter vectors should be generated by 'jittering' the parameters of the root regime of a previously found fit (such as a clade-fit), and by jittering all regime parameters. Default: 100.

sdJitterAllRegimeFits

white noise standard deviation. Default: 0.5.

numCallsOptim

integer specifying the maximum number of calls to optim function. Default: 10. Note that this parameter would be overwritten by a smaller nrow(matParInit) (if matParInit is specified) or by a smaller number of generated initial parameter vectors that satisfy the parameter limits (see also the arguments numRunifInitVecParams,numGuessInitVecParams and argsPCMParamLowerLimit, argsPCMParamUpperLimit).

control

a list passed as control argument to optim. Default: NULL.

Value

a named list of arguments to be passed to PCMFit.