SQL to Create View of Correlations - Aster Analytics

Teradata Aster Analytics Foundation User Guide

Product
Aster Analytics
Release Number
6.21
Published
November 2016
Language
English (United States)
Last Update
2018-04-14
dita:mapPath
kiu1466024880662.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1021
lifecycle
previous
Product Category
Software

To interpret each principal component, you must compute the correlations between the original values for each attribute (in Input) and each principal component (in Output (Table of Principal Components)).

The first step is to create a view that shows both the principal components and the patient attribute values, using this SQL statement:

CREATE VIEW v_pca_health_corr_input AS
  SELECT PC.pid, PC.pca_1, PC.pca_2, PC.pca_3,
    SR.age, SR.bmi, SR.bloodpressure, SR.glucose, SR.strokes,     SR.cigarettes, SR.insulin, SR.hdl
  FROM pca_health_pc PC
  JOIN patient_pca_input SR ON (SR.pid = PC.pid);