Description Usage Arguments Details Value References Examples
It plot the estimated functional coefficients with confidence
bands. The coefficients are estimated by funcreg
.
1 2 3 4 |
obj |
An object of class "funcreg" |
which |
Which functional coefficient we want to plot. 0 for the intercept, 1 for the first functional slope and so on. |
n |
The number of grid points for the plot. The first element is for
the |
fixeds |
If |
fixedt |
If |
plotWF |
If |
type |
The type of plot (see details). |
level |
The level for the confidence interval |
beta |
A one or two argument function (see details). |
... |
Other argument. to pass to either |
If type="beta_t"
, the default, the integral with respect to
s
is shown with pointwise confidence bands. It is simply the functional
intercept with its pointwise confidence bands if which=0
.
If type="beta_s"
(not applicable for which=0
), the
integral with respect to t
is shown with its pointwise confidence bands.
If type="beta_st"
(not applicable for which=0
), the whole
three dimensional curve is shown with its pointwise confidence
surfaces.
If beta
is provided, the estimated curve is replaced by the one
produced by the function beta
, but the same confidence bands are
produced. Useful for pointwise hypothesis testing. If
type="beta_s"
or type="beta_t"
, beta
must be a
function of t
or s
. If type="beta_st"
, it must be a
function of both.
If plotWF=FALSE
and the expected plot is a surface, it returns an
object of class "trellis" produced by wireframe
.
Ramsay, James O., & Silverman, Bernard W. (2005), Functional Data Analysis, Springer, New York.
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 | 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))
plotCoef(res, 1, type="beta_st")
plotConfInt(res, 1, type="beta_t")
## Assume we what to do pointwise hypothesis testing
plotConfInt(res, 1, type="beta_t", beta=function(t) .6-.7*t)
## Nice 3-D confidence interval
plotConfInt(res, 1, type="beta_st")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.