calclulate F-statistic (F-test) on a custom fit

2 views (last 30 days)
I have been looking around and so far I can´t find a solution to this problem. I have a time-series like data set and wrote some code fit the data to a custom fit:
fo_ = fitoptions('method','NonlinearLeastSquares','Lower',[-Inf -Inf -Inf -Inf -Inf 11.999000000000001 5.9989999999999997],'Upper',[Inf Inf Inf Inf Inf 12 6]);
ok_ = isfinite(Mes) & isfinite(P);
if ~all( ok_ )
warning( 'GenerateMFile:IgnoringNansAndInfs',...
'Ignoring NaNs and Infs in data.' );
end
st_ = [0.76574705281324407 0.5312095858606708 0.56903281101487801 0.11028936943862044 0.15894025687112179 0.111780179282573 0.037518452744076058 ];
set(fo_,'Startpoint',st_);
ft_ = fittype('a0+a1*cos(2*pi*x/c1)+b1*sin(2*pi*x/c1)+a2*cos(2*pi*x/c2)+b2*sin(2*pi*x/c2)',...
'dependent',{'y'},'independent',{'x'},...
'coefficients',{'a0', 'a1', 'a2', 'b1', 'b2', 'c1', 'c2'});
Now I need to apply an F-test in order to get a measure of how well the model represents the data ( other estatistic than the ones given by [gof]=...) but I cant find much info on how to do a f-Test on a custom nonlinear model.
Any help or advice will be apreciated

Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!