function [ogrnn,oy] = gmpe_lr(ix, iy)
% function [ogrnn,oy] = gmpe_lr(ix, iy)    
% GMPE linear regression
% Inputs:
%   ix - input values including bias (table)
%   iy - output values (table)
% Outputs
%   ofcc - FCC parameters
%       array of structure coresponding each level of FCC:
%       b - regresion parameters,
%       R2 - adjusted coefficient of determination
%       e - output error
%       SSE - sum of squerred error
%   oy - estymated output of the GMPE

    ogrnn.b = regress(iy,ix) ;
    oy =  ix * ogrnn.b ;
    ogrnn.e = (iy - oy);
    ogrnn.SSE = sum( ogrnn.e .^ 2);
end
