plot.CAM: Summary Plots for "CAM" Class

Description Usage Arguments Details Note See Also Examples

View source: R/CAMer.R

Description

Summary Plots for "CAM" Class

Usage

1
2
3
4
5
6
## S3 method for class 'CAM'
plot(x, filename, T.max, model.cols = matrix(c("#ffa1c2B2",
  "#b50d37B2", "#da577c", "#9bff94", "#0fbd02", "#0fbd02", "#e9a1ff", "#9111b8",
  "#9111b8", "#7af8ff", "#1ea1a8", "#1ea1a8"), ncol = 4), box.log = TRUE,
  box.lim, alpha = 0.6, fit.lwd = 3, LD.col = "black", LD.lwd = 1,
  LD.lim = c(-0.002, 0.25), ...)

Arguments

x

an object of "CAM" class

filename

pdf file path.

T.max

the most ancient generation to be plotted. If an estimated time interval goes beyond T.max, there will be an arrow at the end of the line. Can be missing.

model.cols

a matrix of colors. See "Details"

box.log

a logical expression. If TRUE, the scale of the axis will be in log scale. Defaults to TRUE

box.lim

the limit of msE shown in the boxplot. Defaults to the default of boxplot

alpha

a numeric value in [0,1] representitng alpha of the fitted LD decay curves for Combined LD. Defaults to 0.6. Can be a vector representing different alphas for different models. Ignored if alpha is specified in the third row of model.cols.

fit.lwd

line width of the fitted LD decay curve for Combined LD of the four models. Defaults to 3. Can be a vector representing different line widths for different models.

LD.col

color of the original Combined LD curve. Defaults to "black".

LD.lwd

line width of the original Combined LD curve. Defaults to 1.

LD.lim

the limit of the Weighted LD-axis in the third plot (Fitting of Models). Defaults to c(-.002,.25).

...

further arguments

Details

The function generates three plots in a device. The plot on the top left is the estimated time intervals/points for the four models. The color depth of segments/points corresponds to how many intervals/points covers this part in Jackknives. The deeper the color, the more estimates from Jackknives cover this part. The plot on the top right is the boxplot of msE for the four models. The third plot shows the fitting of four models to Combined_LD in the .rawld file. The numbers after model names in the legend are quasi-F values of the four models for Combined_LD.

If filename is set, plot to the .pdf file, otherwise plot to the current device. The function is specially designed for a .pdf plot with width being 9.6 and height being 7.2. To add things to the plot and then save it to a file, better to set the size as above. May not be able to plot directly in an R window.

The colors in Column 1/2/3/4 correspond to the colors for HI/CGF1(-I)/CGF2(-I)/GA(-I). The first/second row of model.cols is the lightest/deepest possible color in the "Time Intervals/Points" plot. The third row of model.cols is the color for "msE Boxplot" and "Fitting of Models" plot. The colors will be converted to RGB colors by col2rgb, so the input should be convertable by this function. The input of model.cols may also be the numeric vector version of the matrix stated above, i.e. as.numeric(model.cols).

Note

It is not recommended to pass other arguments to basic functions like plot in ....

It is recommended to select the best-fit model(s) according to the output of conclude.model rather than the boxplot of msE because conclude.model does paired t-tests, whose conclusion may look quite different from what we see from the boxplot.

See Also

CAM, conclude.model, rgb, col2rgb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
data(CGF_50)
fit<-CAM(CGF_50,0.3,10L,isolation=FALSE,LD.parallel=FALSE) #will give warnings
plot(fit,"bad_fitting.pdf")

#may not be able to display
#This is not a very informative and user-friendly plot
plot(fit,T.max=2L,model.cols=matrix(c("pink","red","pink",
                             "lightseagreen","green","green",
                             "skyblue","blue","blue",
                             "yellow","orange","orange"),ncol=4),
     box.log=FALSE,box.lim=c(0,1),
     alpha=1,fit.lwd=1,LD.col="gray",LD.lwd=3,LD.lim=c(0,1))

## End(Not run)

QIU-Hongxiang-David/CAMer documentation built on Nov. 13, 2021, 5:15 p.m.