Learn R Programming

dfrr (version 0.1.5)

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, ...)

Value

This function generates the plot of functional regression coefficients.

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.

Examples

Run this code
set.seed(2000)
N<-50;M<-24
N<-30;M<-12
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