polyconf
Polynomial confidence intervals
Syntax
Y = polyconf(p,X)
[Y,DELTA] = polyconf(p,X,S)
[Y,DELTA] = polyconf(p,X,S,param1
,val1
,param2
,val2
,...)
Description
Y = polyconf(p,X)
evaluates
the polynomial p
at the values in X
. p
is
a vector of coefficients in descending powers.
[Y,DELTA] = polyconf(p,X,S)
takes
outputs p
and S
from polyfit
and generates 95% prediction
intervals Y ± DELTA
for new observations at
the values in X
.
[Y,DELTA] = polyconf(p,X,S,
specifies
optional parameter name/value pairs chosen from the following list.param1
,val1
,param2
,val2
,...)
Parameter | Value |
---|---|
'alpha' | A value between 0 and 1 specifying a confidence level
of |
'mu' | A two-element vector containing centering and scaling
parameters. With this option, |
'predopt' | Either |
'simopt' | Either |
The 'predopt'
and 'simopt'
parameters
can be understood in terms of the following functions:
p(x) — the unknown mean function estimated by the fit
l(x) — the lower confidence bound
u(x) — the upper confidence bound
Suppose you make a new observation yn+1 at xn+1, so that
yn+1(xn+1) = p(xn+1) + εn+1
By default, the interval [ln+1(xn+1), un+1(xn+1)] is a 95% confidence bound on yn+1(xn+1).
The following combinations of the 'predopt'
and 'simopt'
parameters
allow you to specify other bounds.
'simopt' | 'predopt' | Bounded Quantity |
---|---|---|
'off' | 'observation' | yn+1(xn+1) (default) |
'off' | 'curve' | p(xn+1) |
'on' | 'observation' | yn+1(x), for all x |
'on' | 'curve' | p(x), for all x |
In general, 'observation'
intervals are wider
than 'curve'
intervals, because of the additional
uncertainty of predicting a new response value (the curve plus random
errors). Likewise, simultaneous intervals are wider than nonsimultaneous
intervals, because of the additional uncertainty of bounding values
for all predictors x.
Examples
Version History
Introduced before R2006a