predict

PURPOSE

Interpolate a fit produced by locfit().

SYNOPSIS

function [y, se] = predict(varargin)

DESCRIPTION

Interpolate a fit produced by locfit().
predict(fit) produces the fitted values at locfit's selected points.
predict(fit,x) interpolates the fits to points specified by x.
Input arguments:
fit The locfit() fit.
x Points to interpolate at. May be a matrix with d columns,
or cell with d components (each a vector). In the former
case, a fitted value is computed for each row of x.
In the latter, the components of x are interpreted as
grid margins.
Can also specify 'data' (evaluate at data points);
or 'fitp' (extract the fitted points).
'band',value
Type of standard errors to compute. Default is 'band','n', for none.
Other choices are 'band','g' (use a global s to estimate the resiudal
standard deviation, so standard errors are s*||l(x)||);
'band','l' (use a local s(x), so std. errors are s(x)*||l(x)||);
'band','p' (prediction errors, so s*sqrt(1+||l(x)||^2).
'direct'
Compute the local fit directly (rather than using local
regression, at each point specified by the x argument.
'kappa',vector
Vector of constants for simultaneous confidence bands,
computed by the kappa0() function.
'level',value
Coverage probability for confidence intervals and bands.
Default is 0.95.
Output is a vector of fitted values (if 'band','n'), or a cell
with fitted value, standard error vectors, and matrix of lower
and upper confidence limits.
Note that for local likelihood fits, back-transformation is
not performed, so that (e.g.) for Poisson regression with the
log-link, the output estimates the log-mean, and its standard errors.
Likewise, for density estimation, the output is log(density).
Author: Catherine Loader.