Bivariate natural logarithmic regression is a method used to model the relationship between a scalar variable y and a variable X. It involves using natural logarithmic functions to model the data and estimate unknown parameters. In the implementation of this regression, the equation is transformed to a linear regression form and solved. The implementation also allows for the calculation of the F value and R^2 to determine statistical significance.
------

SET SCHEMA DM_PAL;

DROP TABLE #PAL_PARAMETER_TBL;
CREATE LOCAL TEMPORARY COLUMN TABLE 
    #PAL_PARAMETER_TBL 
    ("PARAM_NAME" VARCHAR(256), "INT_VALUE" INTEGER, "DOUBLE_VALUE" DOUBLE, "STRING_VALUE" VARCHAR(1000));
INSERT INTO #PAL_PARAMETER_TBL VALUES ('PMML_EXPORT',2, NULL,NULL);

DROP TABLE PAL_NLR_DATA_TBL;
CREATE COLUMN TABLE PAL_NLR_DATA_TBL ( "ID" INT,"Y" DOUBLE,"X1" DOUBLE);
INSERT INTO PAL_NLR_DATA_TBL VALUES (0,10,1);
INSERT INTO PAL_NLR_DATA_TBL VALUES (1,80,2);
INSERT INTO PAL_NLR_DATA_TBL VALUES (2,130,3);
INSERT INTO PAL_NLR_DATA_TBL VALUES (3,160,4);
INSERT INTO PAL_NLR_DATA_TBL VALUES (4,180,5);
INSERT INTO PAL_NLR_DATA_TBL VALUES (5,190,6);
INSERT INTO PAL_NLR_DATA_TBL VALUES (6,192,7);

CALL _SYS_AFL.PAL_LOGARITHMIC_REGRESSION(PAL_NLR_DATA_TBL, "#PAL_PARAMETER_TBL", ?, ?, ?, ?);

