set >0 constraints on ols estimates: seek alternatives to lsqlin()
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Least Squares 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!