penalty0: penalty0 enables the adding of a large penalty as one...

View source: R/datalow_utils.r

penalty0R Documentation

penalty0 enables the adding of a large penalty as one approaches 0.0

Description

penalty0 allows for the option of adding a large penalty as a parameter approaches 0.0 . See spmLL for example code that contains such a parameter. For example, when fitting an spm sometimes the optimal mathematical model fit can occur by depressing the r value to 0 or even go negative. This is only used internally to datalowSA and so is not formally exported.

Usage

penalty0(x)

Arguments

x

the parameter value that potentially incurs a penalty

Value

a single value as a penalty to be added to a Log-Likelihood or SSQ

Examples

datalowSA:::penalty0(0.5)
datalowSA:::penalty0(0.1)
datalowSA:::penalty0(0.01)
datalowSA:::penalty0(0.005)

haddonm/datalowSA documentation built on Nov. 5, 2023, 6:40 p.m.