nlparci
Nonlinear regression parameter confidence intervals
Syntax
ci = nlparci(beta,resid,'covar',sigma)
ci = nlparci(beta,resid,'jacobian',J)
ci = nlparci(...,'alpha',alpha)
Description
ci = nlparci(beta,resid,'covar',sigma)
returns the 95% confidence intervalsci
for the nonlinear least squares parameter estimatesbeta
. Before callingnlparci
, usenlinfit
to fit a nonlinear regression model and get the coefficient estimatesbeta
, residualsresid
, and estimated coefficient covariance matrixsigma
.
ci = nlparci(beta,resid,'jacobian',J)
is an alternative syntax that also computes 95% confidence intervals.J
is the Jacobian computed bynlinfit
. If the'robust'
option is used withnlinfit
, use the'covar'
input rather than the'jacobian'
input so that the requiredsigma
parameter takes the robust fitting into account.
ci = nlparci(...,'alpha',alpha)
returns100(1-alpha)
% confidence intervals.
nlparci
treatsNaN
s inresid
orJ
as missing values, and ignores the corresponding observations.
The confidence interval calculation is valid for systems where the length ofresid
exceeds the length ofbeta
andJ
has full column rank. WhenJ
is ill-conditioned, confidence intervals may be inaccurate.