set >0 constraints on ols estimates: seek alternatives to lsqlin()
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, could someone please advise on the way to set >0 constraints on the following ols estimates (omega, phi_1, tau_1, see below )?
|epsilon_t|^alpha = omega + (phi_1 + tau_1) + |epsilon_t-1|^alpha - phi_1* nu_t-1 + zeta_t;
where nu_t & zeta_t are both error terms.
My matter from the below piece of code (assuming no mistake) is that my estimates are not all >0. Furthermore while using lsqlin() they 're all optimized to zeros which is not helpful.
code:
Epsi = (data - del)/gam;
lagEpsi = [NaN;Epsi(1:end-1)];
signEpsi=sign(Epsi);
Epsi_al=signEpsi.*((signEpsi.* Epsi).^al);
signlagEpsi=sign(lagEpsi);
lagEpsi_al=signlagEpsi.*((signlagEpsi.* lagEpsi).^al);
[b,bint,Resid] = regress(Epsi_al,lagEpsi_al); % compute and store error term
lagResid=[NaN;Resid(1:end-1)]; % lagged error term
X=[ones(size(Epsi)) lagEpsi_al lagResid];
coeff=regress(Epsi_al, X);
Thanks
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Least Squares finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!