Learn R Programming

dfrr (version 0.1.4)

plot.coef.dfrr: Plot dfrr coefficients

Description

Plot a coef.dfrr object. The output is the plot of regression coefficients.

Usage

# S3 method for coef.dfrr
plot(x, select = NULL, ask.hit.return = TRUE, ...)

Arguments

x

a coef.dfrr-object.

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 plot.

Value

This function generates the plot of functional regression coefficients.

Examples

Run this code
# NOT RUN {
set.seed(2000)
# }
# NOT RUN {
N<-50;M<-24
# }
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab