function [ phi , theta ] = arimamle(z,phi0,theta0,d);
% ARIMAMLE(Z,PHI0,THETA0,D) computes MLE of ARIMA
%  process with starting values phi0 and theta0 and
%  d'th order differencing.
[p m] = size(phi0);
[q m] = size(theta0);
phitheta0 = [ phi0 ; theta0 ];
phitheta = constr('arimalik',phitheta0,[],[],[],[],z,d,p);
phi = phitheta(1:p);
theta = phitheta((p+1):(p+q));