Learn R Programming

fda (version 1.2.3)

fRegress: A Functional Regression Analysis of the Concurrent Type

Description

This function carries out a functional regression analysis, where either the dependent variable or one or more independent variables are functional. Non-functional variables may be included on either side of the equation. In a concurrent functional linear model all function variables are all evaluated at a common time or argument value $t$. That is, the fit is defined in terms of the behavior of all variables at a fixed time, or in terms of "now" behavior.

Usage

fRegress(yfdPar, xfdlist, betalist, wt=rep(1,N))

Arguments

yfdPar
the dependent variable object. It may be an object of three possible classes:
  • a vector if the dependent variable is scalar.
  • a functional data object if the dependent variable is functional.
  • a functional parameter object if the dep
xfdlist
a list of length equal to the number of independent variables. Members of this list are the independent variables. They be objects of either of these two classes:

  • a vector if the independent dependent variable is scalar.
  • a functional dat

betalist
a list of length equal to the number of independent variables. Members of this list define the regression functions to be estimated. They are functional parameter objects. Note that even if corresponding independent variable is scalar, its regression coe
wt
weights for weighted least squares

Value

  • a named list of length 6 with these members:
  • yfdParyhe first argument in the call to fRegress.
  • xfdlistthe second argument in the call to fRegress.
  • betalistthe third argument in the call to fRegress.
  • betaestlista list of length equal to the number of independent variables and with members having the same functional parameter structure as the corresponding members of betalist. These are the estimated regression coefficient functions.
  • yhatfdobja functional data object if the dependent variable is functional or a vector if the dependent variable is scalar. This is the set of predicted by the functional regression model for the dependent variable.
  • Cmatinva matrix containing the inverse of the coefficient matrix for the linear equations that define the solution to the regression problem. This matrix is required for function fRegress.stderr that estimates confidence regions for the regression coefficient function estimates.

Details

In the computation of regression function estimates, all independent variables are treated as if they are functional. If argument xfdlist contains one or more vectors, these are converted to functional data objects having the constant basis with coefficients equal to the elements of the vector.

Needless to say, if all the variables in the model are scalar, use this function, but rather either ls or lsfit.

See Also

fRegress.stderr, fRegress.CV, linmod

Examples

Run this code
#See the Canadian daily weather data analyses in the file
# \code{daily.R} for 
#examples of all the cases covered by \code{fRegress}.

Run the code above in your browser using DataLab