res_vs_idv: Residuals plotted against the independent variable

Description Usage Arguments Layers mapping Template titles See Also Examples

View source: R/plot_residuals.R

Description

Model residuals plotted against the independent variable (IDV).

The residuals can be one of:

Usage

1
2
3
4
5
6
7
8
9
res_vs_idv(xpdb, mapping = NULL, res = "CWRES", group = "ID",
  type = "pls", title = "@y vs. @x | @run", subtitle = "Ofv: @ofv",
  caption = "@dir", log = NULL, guide = TRUE, facets, .problem, quiet,
  ...)

absval_res_vs_idv(xpdb, mapping = NULL, res = "CWRES", group = "ID",
  type = "pls", title = "@y vs. @x  | @run", subtitle = "Ofv: @ofv",
  caption = "@dir", log = NULL, guide = FALSE, facets, .problem, quiet,
  ...)

Arguments

xpdb

An xpose database object.

mapping

List of aesthetics mappings to be used for the xpose plot (e.g. point_color).

res

Type of residual to be used. Default is "CWRES".

group

Grouping variable to be used for lines.

type

String setting the type of plot to be used. Can be points 'p', line 'l', smooth 's' and text 't' or any combination of the four.

title

Plot title. Use NULL to remove.

subtitle

Plot subtitle. Use NULL to remove.

caption

Page caption. Use NULL to remove.

log

String assigning logarithmic scale to axes, can be either ”, 'x', y' or 'xy'.

guide

Enable guide display (e.g. unity line).

facets

Either a character string to use facet_wrap_paginate or a formula to use facet_grid_paginate.

.problem

The $problem number to be used. By default returns the last estimation problem.

quiet

Logical, if FALSE messages are printed to the console.

...

Any additional aesthetics to be passed on xplot_scatter.

Layers mapping

Plots can be customized by mapping arguments to specific layers. The naming convention is layer_option where layer is one of the names defined in the list below and option is any option supported by this layer e.g. point_color = 'blue', smooth_method = 'lm', etc.

Template titles

Template titles can be used to create highly informative diagnostics plots. They can be applied to any plot title, subtitle and caption. Template titles are defined via a single string containing key variables staring with a '@' (e.g. '@ofv') which will be replaced by their actual value when rendering the plot. For example ''@run, @nobs observations in @nind subjects'' would become ''run001, 1022 observations in 74 subjects''. The available key variables are listed under template_titles.

See Also

xplot_scatter

Examples

1
2
3
4
5
# Standard residual
res_vs_idv(xpdb_ex_pk, res = c('IWRES', 'CWRES'))

# Absolute value of the residuals
absval_res_vs_idv(xpdb_ex_pk, res = 'CWRES')

guiastrennec/xpose documentation built on Feb. 14, 2018, 4:31 a.m.