% Create social_signaling values from features
score = [];
load data_five_min.mat;

social_signaling = zeros(length(five_min_others), 4);

for i = 1:length(five_min_others)    
    social_signaling(i,1) = five_min_others{i}(4, 1); %Engagmenet
    social_signaling(i,2) = sum(short_speaking{i}(1:5))/5; % Mirroring
    social_signaling(i,3) = five_min_stds{i}(1, 1) +five_min_stds{i}(3, 1);% Stress
    social_signaling(i,4) = five_min_others{i}(3, 1); % Activity level
end

% finds middle managers and vice presidents
mms= find(info(:,2)==0);
vps = find(info(:,2)==1);

% combines objective outcome with social signaling features
nego = [social_signaling(mms,:) social_signaling(vps,:)];

% To get the regression for the Middle Manager as reportet in "Thin Slices
% of Negotiation":
[b,bint,r,rint,stats]=regress(score(1:2:end,3), [nego(:,[2 3 7]) ones(length(nego),1)]);
% score(1:2:end,3) selects the MM score
% nego(:,[2 3 7]) are the following features: Mirroring, Stress of MM and Stress of VP