This function plots D-score against age by cohort

plot_d_a_cohort(
  data,
  daz = FALSE,
  show_smooth = FALSE,
  file = NULL,
  col_manual = NULL,
  model_name = NULL,
  ref_name = c("preliminary_standards", "phase1", "dutch", "gcdg", "none"),
  size = 0.5,
  shape = 1,
  xlim = c(0, 60),
  ylim = c(0, 90),
  xbreaks = seq(0, 60, 12),
  ybreaks = seq(0, 90, 20),
  smooth_line_color = "grey",
  device = "pdf"
)

Arguments

data

Data on which model was fitted

daz

Logical indicating whether to plot D-score or DAZ.

show_smooth

Logical indicating whether to show a smoothed line

file

A filename to which the pdf is saved. If not specified, no plot is saved.

col_manual

A named vector of colors to use for the cohorts.

model_name

Name of the model used for D-score calculation.

ref_name

Name of reference to be plotted.

size

Size of points in the plot.

shape

Shape of points in the plot.

xlim

Limits for the x-axis.

ylim

Limits for the y-axis.

xbreaks

Breaks for the x-axis.

ybreaks

Breaks for the y-axis.

smooth_line_color

Color of the smoothed line.

device

Device to use. Can be either be a device function (e.g. png()), or one of "eps", "ps", "tex" (pictex), "pdf", "jpeg", "tiff", "png", "bmp", "svg" or "wmf" (windows only).

Value

A object of class ggplot