Creates goodness of fit plots either using the xpose.nlmixr package or using a default ggplot call

gof_plot(
  dfrm,
  type = "xpose",
  mdlnm = NULL,
  colby = NULL,
  ptype = "all",
  outnm = NULL,
  projloc = ".",
  title = NULL,
  linscale = FALSE,
  ...
)

Arguments

dfrm

data frame as created by the nlmixr function

type

character defining the type of plot that should be created. currently "xpose" and "user" are supported for xpose or ggplot style of plots

mdlnm

character with name of the model

colby

character vector of length one specifying the variable to color on (for now can be only one variable)

ptype

The type of plots to create. Currently the following is accepted: "all", "ipred.dv", "pred.dv", "idv.res", "pred.res"

outnm

character with name of the output file (see details)

projloc

character with the base location of the shinyMixR project

title

character with the title to place above the plot

linscale

Logical indicating if the scales should be set to linear for DV, PRED and IPRED plots

...

additional arguments passed to ltx_plot or html_plot

Value

in case no outnm is defined a ggplot object will be returned otherwise the results are saved to disk

Details

In case a model is saved, a directory with the name of the model is created within the analysis folder of the current project. Then within this folder the file is saved as outnm. This method was chosen so the interface can easily index applicable files for a certain model. However, this means that output is alwasy saved in this directly regardless of the location of outnm

Author

Richard Hooijmaijers

Examples


if (FALSE) {
 gof_plot(res)
}