fregre.gkam: Fitting Functional Generalized Kernel Additive Models.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Computes functional regression between functional explanatory variables (X(t_1),...,X(t_q)) and scalar response Y using backfitting algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fregre.gkam(
  formula,
  family = gaussian(),
  data,
  weights = rep(1, nobs),
  par.metric = NULL,
  par.np = NULL,
  offset = NULL,
  control = list(maxit = 100, epsilon = 0.001, trace = FALSE, inverse = "solve"),
  ...
)

Arguments

formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The procedure only considers functional covariates (not implemented for non-functional covariates). The details of model specification are given under Details.

family

a description of the error distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. (See family for details of family functions).

data

List that containing the variables in the model.

weights

weights

par.metric

List of arguments by covariate to pass to the metric function by covariate.

par.np

List of arguments to pass to the fregre.np.cv function

offset

this can be used to specify an a priori known component to be included in the linear predictor during fitting.

control

a list of parameters for controlling the fitting process, by default: maxit, epsilon, trace and inverse

...

Further arguments passed to or from other methods.

inverse

="svd" (by default) or ="solve" method.

Details

The smooth functions f(.) are estimated nonparametrically using a iterative local scoring algorithm by applying Nadaraya-Watson weighted kernel smoothers using fregre.np.cv in each step, see Febrero-Bande and Gonzalez-Manteiga (2011) for more details.
Consider the fitted response g(Y.est)=Hy, where H is the weighted hat matrix.
Opsomer and Ruppert (1997) solves a system of equations for fit the unknowns f(.) computing the additive smoother matrix H_k such that f.est_k(X_k)=H_k Y and H= H_1+,...,+H_q. The additive model is fitted as follows:

g(y.est)=∑(i:q) f.est_i(X_i)

Value

Author(s)

Febrero-Bande, M. and Oviedo de la Fuente, M.

References

Febrero-Bande M. and Gonzalez-Manteiga W. (2012). Generalized Additive Models for Functional Data. TEST. Springer-Velag. http://dx.doi.org/10.1007/s11749-012-0308-0

Opsomer J.D. and Ruppert D.(1997). Fitting a bivariate additive model by local polynomial regression.Annals of Statistics, 25, 186-211.

See Also

See Also as: fregre.gsam, fregre.glm and fregre.np.cv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Not run: 
data(tecator)
ab=tecator$absorp.fdata[1:100]
ab2=fdata.deriv(ab,2)
yfat=tecator$y[1:100,"Fat"]

# Example 1: # Changing the argument par.np and family
yfat.cat=ifelse(yfat<15,0,1)
xlist=list("df"=data.frame(yfat.cat),"ab"=ab,"ab2"=ab2)
f2<-yfat.cat~ab+ab2

par.NP<-list("ab"=list(Ker=AKer.norm,type.S="S.NW"),
"ab2"=list(Ker=AKer.norm,type.S="S.NW"))
res2=fregre.gkam(f2,family=binomial(),data=xlist,
par.np=par.NP)
res2

# Example 2: Changing the argument par.metric and family link
par.metric=list("ab"=list(metric=semimetric.deriv,nderiv=2,nbasis=15),
"ab2"=list("metric"=semimetric.basis))
res3=fregre.gkam(f2,family=binomial("probit"),data=xlist,
par.metric=par.metric,control=list(maxit=2,trace=FALSE))
summary(res3)

# Example 3: Gaussian family (by default)
# Only 1 iteration (by default maxit=100)
xlist=list("df"=data.frame(yfat),"ab"=ab,"ab2"=ab2)
f<-yfat~ab+ab2
res=fregre.gkam(f,data=xlist,control=list(maxit=1,trace=FALSE))
res

## End(Not run)

fda.usc documentation built on Feb. 18, 2020, 1:07 a.m.