필터 지우기
필터 지우기

set >0 constraints on ols estimates: seek alternatives to lsqlin()

조회 수: 2 (최근 30일)
Isma
Isma 2015년 7월 8일
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개)

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by