필터 지우기
필터 지우기

what is exactly yhat in output of regstat ?

조회 수: 1 (최근 30일)
Vincent Moron
Vincent Moron 2013년 4월 26일
Hello
I use regstats to fit a nonlinear trend. I just check as an example the firt using a linear fit with regstats. X is my time series (length = 2000).. I used s=regstats([1:2000],X,'linear').
Then I am surprised that s.yhat is ... non linear while the fitted value (a straight line in my case) is retrieven accurately using fit=s.beta(1)*[1:2000]+s.beta(2);
So what is exactly s.yhat ?
Thanks in advance
Vincent

채택된 답변

Tom Lane
Tom Lane 2013년 4월 30일
Looks to me like you reversed the two inputs to regstats. Unfortunately this function takes (y,x) rather then (x,y):
>> help regstats
regstats Regression diagnostics for linear models.
regstats(RESPONSES,DATA,MODEL) regresses measurements in the vector

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model Building and Assessment에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by