# MATLAB-Fsolve program for non-linear equations(repost)

function []= Pareto_Project(n,params) % Parameter inputs:L, U,alpha,sigma] L = params(1); % lower limit U = params(2); % upper limit alpha = params(3); % exponent or power indices sigma=params(4); % specified variance model %-------------------------------------------------------------------------- z = rand(n,1); x =((L^(-a) - z.*(L^(-a) - U^(-a))).^(-1/a)); e=randn(n,3); %case 1 is for specified variance e1=e(:,1).*sigma; dataY1=x+e1 L=(-N/2*log(2*pi))-N*log(sigma)+N*log(a)-N*log(L^(-a)-U^(-a))+sum(log(integral[L,U](x^(-a-1)*exp[-0.5*((yj-x)./sigma)^2); where integral[L,U] is the integral from L to U of that given density function. options=optimset('Display','iter','MaxFunEvals',3e3,'MaxIter',3e3,'diagnostics','on','Algorithm','levenberg-marquardt'); % Option to display output [point fval exitflag]=fsolve ( AT (point)mypowerlawfun1(point,dataY1),point0,options); function F=mypowerlawfun1(point,dataY1) %system of partial derivatives with the unknown parameters of L , U , alpha %and sigma. L=point(1);U=point(2);a=point(3);sigma=point(4); z=dataY1; n=length(z); I1=zeros(n,1); EyL=zeros(n,1); EyU=zeros(n,1); I2=zeros(n,1); I3=zeros(n,1); for k=1:n I1(k)=quadl(AT integrand1,L,U,[],[],z(k),a, sigma); % Eyx=exp(-0.5*((z(j)-x)./sigma).^2); EyL(k)=exp(-0.5.*((z(k)-L)./sigma).^2); EyU(k)=exp(-0.5.*((z(k)-U)./sigma).^2); I2(k)=quadl(AT integrand2,L,U,[],[],z(k),a,sigma); I3(k)=quadl(AT integrand3,L,U,[],[],z(k),a,sigma); pL=EyL./I1; pAlp=I2./I1; pU=EyU./I1; pS=I3./I1; end

## Deliverables

1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No 3rd party components unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement).

To get the above program to fine tune the program so that it can estimate the parameters of alpha, sigma and L and U, given the data that is generated from the power law distribution. All source code shall be delivered to the employer THE "AT" above Should be replaced with the "SHIFT 2" symbol

## Platform