rater_vector = [.7;.4;.5;.4;.2;.3]
yield_vector = [.2;.15;.4;.3;.2;.2]

intercorr = [ 1.0 .3 .3 .2 .2 .2; .3 1.0 .2 .1 .0 .0; ...
    .3 .2 1.0 .4 .2 .2; .2 .1 .4 1.0 .5 .6; .2 .0 .2 .5 1.0 .5; ...
    .2 .0 .2 .6 .5 1.0 ]

beta_rater = inv(intercorr)* rater_vector

beta_rater_abs = abs(beta_rater)

sum_beta_rater = sum(beta_rater_abs)

prop_beta_rater = (beta_rater_abs) ./ (sum_beta_rater) 

beta_yield = inv(intercorr)* yield_vector

beta_yield_abs = abs(beta_yield)

sum_beta_yield = sum(beta_yield_abs)

prop_beta_yield = (beta_yield_abs) ./ (sum_beta_yield) 

rsquared_rater = (rater_vector')*beta_rater

rsquared_yield = (yield_vector')*beta_yield

    
    