Find data in table outside of prediction intervals
I have a table T, and I am fitting two of the variables with an exponntial function. I would like to identify any points that lie outside of my prediction interval from the fit, and return the complete row in table T.
I am using fit to make the exponential fit and find the confidence bounds. In my example, there are two datapoints that lie outside the prediction interval, and I would like to know what rows they are in T.
Example table is attached, thanks!
load example_table.mat
T=sortrows(T,"Xdata");
x=T.Xdata;
y=T.Ydata;
fitresult = fit(x,y,’exp1′)
pred = predint(fitresult,x,0.95);
plot(fitresult,x,y)
hold on
plot(x,pred,’m–‘)
legend({‘Data’,’Fitted curve’, ‘Prediction intervals’},…
‘FontSize’,8,’Location’,’northwest’)I have a table T, and I am fitting two of the variables with an exponntial function. I would like to identify any points that lie outside of my prediction interval from the fit, and return the complete row in table T.
I am using fit to make the exponential fit and find the confidence bounds. In my example, there are two datapoints that lie outside the prediction interval, and I would like to know what rows they are in T.
Example table is attached, thanks!
load example_table.mat
T=sortrows(T,"Xdata");
x=T.Xdata;
y=T.Ydata;
fitresult = fit(x,y,’exp1′)
pred = predint(fitresult,x,0.95);
plot(fitresult,x,y)
hold on
plot(x,pred,’m–‘)
legend({‘Data’,’Fitted curve’, ‘Prediction intervals’},…
‘FontSize’,8,’Location’,’northwest’) I have a table T, and I am fitting two of the variables with an exponntial function. I would like to identify any points that lie outside of my prediction interval from the fit, and return the complete row in table T.
I am using fit to make the exponential fit and find the confidence bounds. In my example, there are two datapoints that lie outside the prediction interval, and I would like to know what rows they are in T.
Example table is attached, thanks!
load example_table.mat
T=sortrows(T,"Xdata");
x=T.Xdata;
y=T.Ydata;
fitresult = fit(x,y,’exp1′)
pred = predint(fitresult,x,0.95);
plot(fitresult,x,y)
hold on
plot(x,pred,’m–‘)
legend({‘Data’,’Fitted curve’, ‘Prediction intervals’},…
‘FontSize’,8,’Location’,’northwest’) curve fitting MATLAB Answers — New Questions