25.10.2016 Views

SAP HANA Predictive Analysis Library (PAL)

sap_hana_predictive_analysis_library_pal_en

sap_hana_predictive_analysis_library_pal_en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(12, 1, 2, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(12, 0, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(15, 0, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(16, 0, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(18, 0, 2, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(20, 1, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(22, 0, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(24, 1, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(28, 0, 3, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(30, 0, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(30, 1, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(33, 0, 1, 'control');<br />

INSERT INTO <strong>PAL</strong>_TRIAL_DATA_TBL VALUES(42, 1, 1, 'control');<br />

DROP TABLE <strong>PAL</strong>_TRIAL_ESTIMATES_TBL;<br />

CREATE COLUMN TABLE <strong>PAL</strong>_TRIAL_ESTIMATES_TBL LIKE <strong>PAL</strong>_TRIAL_ESTIMATES_T;<br />

DROP TABLE <strong>PAL</strong>_TRIAL_LOGRANK_STAT1_TBL;<br />

CREATE COLUMN TABLE <strong>PAL</strong>_TRIAL_LOGRANK_STAT1_TBL LIKE <strong>PAL</strong>_TRIAL_LOGRANK_STAT1_T;<br />

DROP TABLE <strong>PAL</strong>_TRIAL_LOGRANK_STAT2_TBL;<br />

CREATE COLUMN TABLE <strong>PAL</strong>_TRIAL_LOGRANK_STAT2_TBL LIKE <strong>PAL</strong>_TRIAL_LOGRANK_STAT2_T;<br />

CALL "DM_<strong>PAL</strong>".<strong>PAL</strong>_KMSURV_PROC(<strong>PAL</strong>_TRIAL_DATA_TBL, #<strong>PAL</strong>_CONTROL_TBL,<br />

<strong>PAL</strong>_TRIAL_ESTIMATES_TBL, <strong>PAL</strong>_TRIAL_LOGRANK_STAT1_TBL,<br />

<strong>PAL</strong>_TRIAL_LOGRANK_STAT2_TBL) with OVERVIEW;<br />

SELECT * FROM <strong>PAL</strong>_TRIAL_ESTIMATES_TBL;<br />

SELECT * FROM <strong>PAL</strong>_TRIAL_LOGRANK_STAT1_TBL;<br />

SELECT * FROM <strong>PAL</strong>_TRIAL_LOGRANK_STAT2_TBL;<br />

Option 2: Weibull Distribution<br />

Technology Background<br />

Weibull distribution is often used for reliability and survival analysis. It is defined by 3 parameters: shape, scale,<br />

and location. Scale works as key to magnify or shrink the curve. Shape is the crucial factor to define how the<br />

curve looks like, as described below:<br />

●<br />

●<br />

●<br />

Shape = 1: The failure rate is constant over time, indicating random failure.<br />

Shape < 1: The failure rate decreases over time.<br />

Shape > 1: The failure rate increases over time.<br />

For the same raw data as in the above Kaplan-Meier option, also shown below:<br />

Table 430:<br />

Treatment<br />

Survival Time (months)<br />

Linoleic acid (n = 25) 1+, 5+, 6, 6, 9+, 10, 10, 10+, 12, 12, 12, 12, 12+, 13+, 15+, 16+,<br />

20+, 24, 24+, 27+, 32, 34+, 36+, 36+, 44+<br />

Control (n = 24) 3+, 6, 6, 6, 6, 8, 8, 12, 12, 12+, 15+, 16+, 18+, 18+, 20, 22+,<br />

24, 28+, 28+, 28+, 30, 30+, 33+, 42<br />

The DISTRFITCENSORED function is used to fit the Weibull distribution on the censored data. For the two<br />

types of treatment, linoleic acid and control, two separate calls of DISTRFITCENSORED are performed to get<br />

two Weibull distributions.<br />

Implementation Steps<br />

Assume that:<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Predictive</strong> <strong>Analysis</strong> <strong>Library</strong> (<strong>PAL</strong>)<br />

End-to-End Scenarios P U B L I C 569

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!