Problem with using nlinfit for parameter estimation

I have a problem with estimating parameter values with a model. as a result I receive a linear model fit, while I know the model is not linear, therefore underestimating or neglecting variables. (see first attachment)
In addition I receive the following notification:
>> Test_Geider3
Warning: Some columns of the Jacobian are effectively zero at the solution, indicating that the model is insensitive to some of
its parameters. That may be because those parameters are not present in the model, or otherwise do not affect the predicted
values. It may also be due to numerical underflow in the model function, which can sometimes be avoided by choosing better
initial parameter values, or by rescaling or recentering. Parameter estimates may be unreliable.
> In nlinfit at 348
In Test_Geider3 at 16
Beta CI+ CI-
1.0e+10 *
-0.2802 -1.0602 0.4998
0.0000 0.0000 0.0000
-0.0000 -0.0000 -0.0000
standard error of fit w
0.1587
r2 w =
0.7303
I have tried to rescale the axis by a multiplication by 10^6, for each axis independently, but this didn't work. The model is given below.
Here is the model:
function mu=Geider2(beta,I)
mu_max=beta(1);
QY= beta(2);
r_max= beta(3);
data = xlsread('input data Neo.xlsx','Geider');
K_abs=data(:,4);
mu = ((mu_max+r_max).*(1-exp(-I.*1e-6.*(QY.*K_abs./1000)./(mu_max+r_max))))-r_max;
And the file were I do the parameter estimation:
clear all close all
data = xlsread('input data Neo.xlsx','Geider');
[m,n]=size(data);
I=data(:,11);
mu_meas=data(:,3);
beta0=[2.3 2.9 0.05];
[betaw,Rw,Jw] = nlinfit(I,mu_meas,'Geider3',beta0);
% confidence intervals
ciw = nlparci(betaw,Rw,Jw);
disp(' Beta CI+ CI-');
disp([betaw' ciw]);
mu_fitted=feval('Geider3',betaw,I);
sterror=sqrt((sum(Rw.^2))/(m-1));
disp('standard error of fit w');
disp(sterror);
y=mu_meas;
yhat=mu_fitted;
RSS = norm(yhat-mean(y))^2; % Regression sum of squares.
TSS = norm(y-mean(y))^2; % Total sum of squares.
r2 = RSS/TSS; % R-square statistic.
disp(' r2 w = ');
disp(r2);
% plot of data
figure(4);
hold on
plot(I,mu_meas,'d')
hold off
% fit of data
hold on
plot(I, mu_fitted,'r')
xlabel('Light intensity (umol/m2/s)'),ylabel('Growth rate (day-1)');
hold off
I have attached the experimental data (excel)

Answers (0)

Asked:

on 9 Nov 2015

Edited:

dpb
on 9 Nov 2015

Community Treasure Hunt

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

Start Hunting!