View source: R/plot.coef.dfrr.R
plot.coef.dfrr | R Documentation |
Plot a coef.dfrr
object. The output is the plot of regression coefficients.
## S3 method for class 'coef.dfrr'
plot(x, select = NULL, ask.hit.return = TRUE, ...)
x |
a |
select |
a vector of length one or more of indices of regression coefficients to plot. |
ask.hit.return |
a boolean indicating whether to wait for interaction of the user between any two plots. |
... |
graphical parameters passed to |
This function generates the plot of functional regression coefficients.
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)
coefs<-coef(dfrr_fit)
plot(coefs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.