error nonlinear model fit

조회 수: 1 (최근 30일)
Mahmoud Zeydabadinezhad
Mahmoud Zeydabadinezhad 2016년 4월 26일
편집: Mahmoud Zeydabadinezhad 2016년 4월 26일
Hello All, I'm trying to use NonLinearModel.fit as below:
X = [mean_age_group1', TMI_group1']; %%Design matrix
Y = mean_FA_group1'; %%Response vector
FA_fun = @(b,x)b(1) + b(2)*x(:,1).^b(3) + b(4)*x(:,2).^b(5);
beta0 = [0.25 0.0005 1 -0.1 1];
mdl_FA = NonLinearModel.fit(X,Y,FA_fun,beta0);
But I receive the following error:
Error using internal.stats.getscheffeparam>ValidateParameters (line 182)
If non-empty, JW must be a numeric, real matrix.
Error in internal.stats.getscheffeparam (line 110)
[J,VF,VP,JW,Intopt,TolSVD,TolE,VQ,usingJ] = ValidateParameters(J,VF,VP,JW,Intopt,TolSVD,TolE,VQ,allowedIntopt);
Error in nlinfit (line 433)
sch = internal.stats.getscheffeparam('WeightedJacobian',J(~nans,:),'Intopt','observation','VQ',VQ);
Error in NonLinearModel/fitter (line 1123)
nlinfit(X,y,F,b0,opts,wtargs{:},errormodelargs{:});
Error in classreg.regr.FitObject/doFit (line 94)
model = fitter(model);
Error in NonLinearModel.fit (line 1430)
model = doFit(model);
Any idea what is the problem?
Thank you!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by