Learn R Programming

lmms (version 1.3.3)

plot.lmmsde: Plot of lmmsde objects

Description

Plot of the raw data the mean and the fitted lmmsde profile.

Usage

"plot"(x, y, data, time, group, type, smooth, mean, ...)

Arguments

x
An object of class lmmsde.
y
numeric or character value. Either the row index or the row name determining which feature should be plotted.
data
alternative matrix or data.frame containing the original data for visualisation purposes.
time
alternative numeric indicating the sample time point. Vector of same length as row lenghth of data for visualisation purposes.
group
alternative numeric indicating the sample group. Vector of same length as row length of data for visualisation purposes.
type
a character indicating what model to plot. Default 'all', options: 'time', 'group','group*time'.
smooth
an optional logical value. By default set to FALSE. If TRUE smooth representation of the fitted values.
mean
alternative logical if the mean should be displayed. By default set to TRUE.
...
Additional arguments which are passed to plot.

Value

plot showing raw data, mean profile and fitted profile.

Examples

Run this code
## Not run: 
# data(kidneySimTimeGroup)
# lmmsDEtestl1 <-lmmsDE(data=kidneySimTimeGroup$data,time=kidneySimTimeGroup$time,
#                 sampleID=kidneySimTimeGroup$sampleID,
#                 group=kidneySimTimeGroup$group,
#                 experiment="longitudinal1",basis="p-spline",keepModels=T) 
# plot(lmmsDEtestl1,y=2,type="all")
# plot(lmmsDEtestl1,y=2,type="time")
# plot(lmmsDEtestl1,y=2,type="group")
# plot(lmmsDEtestl1,y=2,type="group*time",smooth=TRUE)
# 
# #to save memory do not keep the models
# lmmsDEtestl1 <-lmmsDE(data=kidneySimTimeGroup$data,time=kidneySimTimeGroup$time,
#                 sampleID=kidneySimTimeGroup$sampleID,
#                 group=kidneySimTimeGroup$group,
#                 experiment="longitudinal1",basis="p-spline",keepModels=F) 
# # just the fitted trajectory                 
# plot(lmmsDEtestl1,y=2,type="all")
# 
# plot(lmmsDEtestl1,y=2,type="all",data=kidneySimTimeGroup$data,time=kidneySimTimeGroup$time,
# group=kidneySimTimeGroup$group)## End(Not run)  

Run the code above in your browser using DataLab