vcov: Variance of functional coefficients

Description Usage Arguments Details Value References Examples

Description

It computes the functional variance of the estimated functional parameters obtained by funcreg

Usage

1
2
3
## S3 method for class 'funcreg'
vcov(object, which, type = c("beta", "beta_t", "beta_s", "beta_st"),
                         s = NULL, t = NULL, ...)

Arguments

object

An object of class "funcreg"

which

The variance of which functional parameters shall we compute? 0 for the intercept, 1 for the first functional slope and so on.

type

What type of variance to compute (see details).

s

If type is "beta_s", the variance is computed at each element of s. If NULL, it is computed at the same time units as for the observed observations.

t

If type is "beta_t", the variance is computed at each element of s. If NULL, it is computed at the same time units as for the observed observations.

...

Argument to pass to other objects

Details

The function computed the variance of the integral of the functional parameters (single for the intercept and double for the slopes) when type='beta'.

If type='beta_t', it is the pointwise variance of the functional intercept if which=0 and the pointwise variance of the integral of the slopes which respect to s. By default (t=NULL) the time units of the observed data is used. Alternatively, we can provide a vector of points.

If type='beta_s', (not available for which=0) it is the pointwise variance of the integral of the slopes which respect to y. By default (s=NULL), equally spaced grid points are generated using the range of s-basis and the number of time units equals to the one from the observed observations.

If type='beta_st' (not available for which=0), a two dimensional pointwise variance is computed.

For the last three cases, vcov returns either a one dimension functional data object or a two-dimensional one.

Value

It returns a list containing at least:

V

Either a numeric value when type='beta' or an 'fda' object when type='beta_t' or type='beta_s', or a matrix when type='beta_st'.

References

Ramsay, James O., & Silverman, Bernard W. (2005), Functional Data Analysis, Springer, New York.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(GDPv56) 

## We just create response and a covariate artificialy from the GDP
## series

y <- GDPv56[,1:30]
x <- GDPv56[,31:60]
t <- seq(0,1,len=nrow(y))

## First we create the "myfda" objects
yfd <- coefEst(y, t, .0004, 15, 2)
xfd <- coefEst(x, t, .0004, 15, 2)


## we just set lambda and k to arbitrary values
res <- funcreg(yfd~xfd, k=c(5,5), lambda=c(.001,.001,.001))

vcov(res, which=0)

plot(vcov(res, 1, type="beta_t")$V)

funcreg documentation built on May 2, 2019, 5:45 p.m.

Related to vcov in funcreg...