Prediction intervals for cfit
or sfit
object
ci = predint(fitresult,x)
ci = predint(fitresult,x,level)
ci = predint(fitresult,x,level,intopt
,simopt
)
[ci,y] = predint(...)
ci = predint(fitresult,x)
returns upper
and lower 95% prediction bounds for response values associated with the
cfit
object fitresult
at the new predictor
values specified by the vector x
. fitresult
must be an output from the fit
function to contain the
necessary information for ci
. ci
is an
n
-by-2 array where n = length(x)
. The left
column of ci
contains the lower bound for each coefficient; the
right column contains the upper bound.
ci = predint(fitresult,x,level)
returns
prediction bounds with a confidence level specified by level
.
level
must be between 0
and
1
. The default value of level
is
0.95
.
ci = predint(fitresult,x,level,
specifies the type of bounds to compute. intopt
,simopt
)
intopt
is one of
'observation'
— Bounds for a new observation
(default)
'functional'
— Bounds for the fitted
curve
simopt
is one of
'off'
— Non-simultaneous bounds (default)
'on'
— Simultaneous bounds
Observation bounds are wider than functional bounds because they measure the
uncertainty of predicting the fitted curve plus the random variation in the new
observation. Non-simultaneous bounds are for individual elements of
x
; simultaneous bounds are for all elements of
x
.
[ci,y] = predint(...)
returns the response
values y
predicted by fitresult
at the
predictors in x
.
predint
cannot compute prediction intervals for
non-parametric regression methods such as
Interpolant
, Lowess
, and
Spline
.