% Analyze transformation of area to attenuation rate

clear

load(['/Users/Colin/Documents/MATLAB/DFlow/influences_chap2/data/'...
    'QARw_char_1000m.mat']);

% Load data
dir_root = ['/Users/Colin/Documents/MATLAB/DFlow/'...
    'influences_chap2/multi_regress/'];

% Input dependent variables
load(strcat(dir_root,'qar_rate1000s180.mat'));
load(strcat(dir_root,'qar_rate1000s300.mat'));


% s180 plots
% figure(1)
% set(gcf,'color','white');
% plotmatrix(QARw_char_1000m,qar_rate1000s180)
% 
% figure(2)
% set(gcf,'color','white');
% plotmatrix(QARw_char_1000m)

% s300 plots
% figure(3)
% set(gcf,'color','white');
% plotmatrix(QARw_char_1000m,qar_rate1000s300)

figure(4)
set(gcf,'color','white');
%scatter(log(qar_rate1000s300(:,1)),QARw_char_1000m(:,1));
mdl300all = fitlm(QARw_char_1000m(:,1),log(qar_rate1000s300(:,1)))
plot(mdl300all)

figure(5)
set(gcf,'color','white');
%scatter(log(qar_rate1000s300(:,1)),QARw_char_1000m(:,2));
mdl300fp = fitlm(QARw_char_1000m(:,2),log(qar_rate1000s300(:,1)))
plot(mdl300fp)

% figure(6)
% set(gcf,'color','white');
% %scatter(log(qar_rate1000s300(:,1)),QARw_char_1000m(:,1));
% mdl300ch = fitlm(QARw_char_1000m(:,5),log(qar_rate1000s300(:,1)))
% plot(mdl300ch)
% 
% figure(7)
% set(gcf,'color','white');
% %scatter(log(qar_rate1000s300(:,1)),QARw_char_1000m(:,1));
% mdl300fpw = fitlm(QARw_char_1000m(:,10),log(qar_rate1000s300(:,1)))
% plot(mdl300fpw)
% 
% figure(8)
% set(gcf,'color','white');
% %scatter(log(qar_rate1000s300(:,1)),QARw_char_1000m(:,1));
% mdl300chw = fitlm(QARw_char_1000m(:,11),log(qar_rate1000s300(:,1)))
% plot(mdl300chw)

