View source: R/plot.fitted.dfrr.R
plot.fitted.dfrr | R Documentation |
Plot a fitted.dfrr
object.
## S3 method for class 'fitted.dfrr'
plot(
x,
id = NULL,
main = NULL,
col = "blue",
lwd = 2,
lty = "solid",
cex.circle = 1,
col.circle = "black",
ylim = NULL,
...
)
x |
the output of the function fitted.dfrr |
id |
a vector of length one or more containing subject ids to plot. Must be matched with
|
main |
a vector of length one or |
col, lwd, lty, ... |
graphical parameters passed to |
cex.circle, col.circle |
size and color of circles and filled circles. |
ylim |
a vector of length two indicating the range of y-axis of the plot. |
The output is the plot of latent curves over the observed binary sequence. The binary sequence is illustrated with circles and filled circles for the values of zero and one, respectively.
This function generates plot of fitted curves.
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)
fitteds<-fitted(dfrr_fit)
plot(fitteds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.