|
Mike <SulfateIon@gmail.com> wrote in message <0a8f6fe0-0b2d-4779-bf7d-dbe6a91696c7@googlegroups.com>...
> Hi
>
> I am confusing with mse(Mean Squared Error) from regstats
> y=[3 2 8 5 7 6];X=[2 3 8 6 5 4];mse=mean((X-y).^2)
>
> mse =
>
> 1.8333
>
> >> stats = regstats(y,X,'linear',{'beta','covb','mse','yhat','r','rsquare','adjrsquare','tstat'});
> stats.mse
>
> ans =
>
> 2.2786
>
> Does anybody know what's the difference?
I don't know anything about regstats, but the reason seems too obvious: you do not perform any regression in your mse calculation.
Bruno
|