Learn R Programming

fda (version 1.2.3)

smooth.pos: Smooth Data with a Positive Function

Description

A set of data is smoothed with a functional data object that only takes positive values. For example, this function can be used to estimate a smooth variance function from a set of squared residuals. A function $W(t)$ is estimated such that that the smoothing function is $exp[W(t)]$.

Usage

smooth.pos(argvals, y, WfdParobj, wt=rep(1,nobs),
           conv=.0001, iterlim=20, dbglev=1)

Arguments

argvals
a vector of argument values.
y
a vector of data values. This function can only smooth one set of data at a time.
WfdParobj
a functional parameter object that provides an initial value for the coefficients defining function $W(t)$, and a roughness penalty on this function.
wt
a vector of weights to be used in the smoothing.
conv
a convergence criterion.
iterlim
the maximum number of iterations allowed in the minimization of error sum of squares.
dbglev
either 0, 1, or 2. This controls the amount information printed out on each iteration, with 0 implying no output, 1 intermediate output level, and 2 full output. If either level 1 or 2 is specified, it can be helpful to turn off the output buffering fea

Value

  • a named list of length 4 containing:
  • Wfdobja functional data object defining function $W(x)$ that that optimizes the fit to the data of the monotone function that it defines.
  • Flista named list containing three results for the final converged solution: (1) f: the optimal function value being minimized, (2) grad: the gradient vector at the optimal solution, and (3) norm: the norm of the gradient vector at the optimal solution.
  • iternumthe number of iterations.
  • iternumthe number of iterations.
  • iterhista iternum+1 by 5 matrix containing the iteration history.

See Also

smooth.monotone, smooth.morph

Examples

Run this code
#See the analyses of the daily weather data for examples.

Run the code above in your browser using DataLab