function v = myfuncu(param,m,jstr,svec);
%Function for CPS calculation
for i=1:length(svec);
    for j=1:11; 
        m(390+j,svec(i))=m(390+j,svec(i))*param(j); 
    end;
    x=tseries(mm(1976,1):mm(2013,4),m(:,svec(i)));
    xsa=x12(x,Inf,'specfile=',char(jstr(i)));
    msa(:,i)=double(xsa);
end;
smsa=sum(msa')';
v=smsa(391:402)-smsa(390:401);
v=sqrt(mean((v-mean(v)).^2));