My e-mail: wangp...@gmail.com
The following is the SPA.OX procedure after my "perfecting":
#include <oxstd.h>
#include <oxfloat.h>
#import "spa_src"
decl sFileName="data.xls",
dB=1000,
dq=0.50,
//lossfunction="mae";
//lossfunction="mse";
//lossfunction="hmse";
lossfunction="hmae";
//lossfunction="qlike";
//lossfunction="r2log";
//hmse(Y,Yhat)
//{return meanc((1-(Yhat./Y)).^2);}
hmae(Y,Yhat)
{return meanc(fabs(1-(Yhat./Y)));}
//qlike(Y,Yhat)
//{return meanc(log(Yhat)+Y./Yhat);}
//r2log(Y,Yhat)
//{return meanc(log(Y./Yhat).^2);}
main(){
decl mX=loadmat(sFileName),mY,mYhat;
mY=mX[][0]; mYhat=mX[][1:5];
SPA(mY, mYhat, lossfunction, TestStatScaledMax, dB, dq);
}
That is:
hmae(Y,Yhat)
{return fabs(1-(Yhat./Y));}
(to not take meanc() )
-PRH
On Sep 17, 6:43 pm, "王鹏" <wangpeng...@gmail.com> wrote:
> Hello, everyone, I'm a doctor coming from SouthWest University of
> China. Recently I meet some difficulty in perfecting the SPA.OX
> procedure. Because in SPA.OX only two lossfunction, i.e. MAE and MSE,
> were defined, so I want to define my own lossfunction such as HMSE,
> HMAE...However, after I defined four lossfunction and run the
> procedure, I find the "p-values" and "t-stat" are the same for all
> models and for all my own lossfunction. There must be something wrong
> with the procedure. So, I hope someone could help me to check the
> procedure and inform me where the wrong is. Thanks a lot.
>
> My e-mail: wangpeng...@gmail.com
> }- Hide quoted text -
>
> - Show quoted text -