plot.dfrr | R Documentation |
Plot the regression coefficients, principal components, kernel function and residuals of a dfrr
-object.
## S3 method for class 'dfrr'
plot(x, plot.kernel = TRUE, ...)
x |
the output of the function fitted.dfrr |
plot.kernel |
a boolean indicating whether plots the kernel function or not.
|
... |
graphical parameters passed to |
The contour plot of the kernel function is produced if the package ggplot2
is installed.
Plotting the 3d surface of the kernel function is also depends on the package plotly
.
To produce the qq-plot, the package car
must be installed.
This function generates a set of plots, including functional regression coefficients, principal components, 2-d contour and 3d-surface of kernel function, and QQ-plot of residuals.
set.seed(2000)
N<-50;M<-24
X<-rnorm(N,mean=0)
time<-seq(0,1,length.out=M)
Y<-simulate_simple_dfrr(beta0=function(t){cos(pi*t+pi)},
beta1=function(t){2*t},
X=X,time=time)
#The argument T_E indicates the number of EM algorithm.
#T_E is set to 1 for the demonstration purpose only.
#Remove this argument for the purpose of converging the EM algorithm.
dfrr_fit<-dfrr(Y~X,yind=time,T_E=1)
plot(dfrr_fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.