Plot of lmmsde objects

Share:

Description

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

Usage

1
2
## S3 method for class 'lmmsde'
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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)