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 Center および File ExchangeLinear Least Squares についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by