Tobias Schoch
The robsurvey
package implements the Huber and Tukey (biweight)
src/psifunctions.c
. For the Huber
The functions are referenced by an integer value (in the C and R source code):
psi = 0
: Huber;psi = 1
: asymmetric Huber;psi = 2
: Tukey biweight.For each type of
psi
-function, weight
-function, psi-prime
-function, the first derivative of the
The foo()
.
double foo(double x, const double k)
{
}
Argument x
is the function argument and argument k
is the robustness tuning constant.
Limitations. In this note, we consider only adding support for
-functions whose signature comply with the above dummy function. If you want to add functions that do not comply, you have to modify the existing code.
The method dispatch takes place in the functions (see
src/psifunctions.c
):
get_wgt_function()
get_psi_function()
get_psi_prime_function()
and is implemented with function pointers.
In order to add support for additional
psi
-, weight
, and psi-prime
-functions to the source;switch
statement of the functions get_wgt_function()
,
get_psi_function()
, and get_psi_prime\_function()
;