phxplot: Plotting of Phoenix NLME output

Description Usage Arguments Details Value Author(s) Examples

Description

Several plots, selectable by the argument plot.type are currently available: observations versus predictions, correlation, residuals, parameter distribution, forest plots, and individual and dynamic individual fits.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
phxplot(phxd = NULL, 
        plot.type, 
        cat.cov, 
        cont.cov,
        forest.ci = c(0.025, 0.5, 0.975), 
        multip = TRUE, 
        outpdf = TRUE, 
        scale = NULL, 
        sel.ID, 
        sparname)

Arguments

phxd

Phoenix NLME plot object. Default of NULL requires working directory to be set to model folder so Phoenix NLME output can be read.

plot.type

A character string specifying the type of plot needed:

"correlation"- Correlation matrix plots of parameters.

"obs.pred" - Scatterplots of observations versus prediction with loess smoothed line.

"residual.scatter" - Scatterplots of weighted residual and conditional weighted versus predictions and time after dose (if applicable)

"param.catcov" - Boxplots of parameters versus categorical covariates. Argument cat.cov has to be defined and empirical bayes estimates of parameters have to be requested (see cat.cov and phxnlme).

"param.contcov" - Scatterplots of parameters versus continuous covariates. Argument cont.cov has to be defined and empirical bayes estimates of parameters have to be requested (see cont.cov and phxnlme).

"param" - Histograms of parameters. Empirical bayes estimates of parameters have to be requested (see phxnlme). See also multip.

"forest" - Forest/tornado plots of specified categorical covariates and parameters. Argument cat.cov and sparname need to be defined and empirical bayes estimates of parameters have to be requested (see cat.cov, sparname and phxnlme). Note: Quantiles are computed from post-hoc values of the parameters.

"ind" - Individual fits.

"ind.dynamic" - Dynamic plots of individual fits. Only one subject can be dynamically plotted at a time. Requires specification of ID (see sel.ID).

"qq" - Correlation matrix plots of parameters. Argument cat.cov has to be defined and empirical bayes estimates of parameters have to be requested (see cat.cov and phxnlme). Note: Quantiles are computed from post-hoc values of the parameters.

cat.cov

A vector of character strings, specifying categorical covariates in the dataset to be plotted. Required for forest and parameters versus categorical covariate plots (see plot.type).

cont.cov

A vector of character strings, specifying continuous covariates in the dataset to be plotted. Required for parameters versus continuous covariate plots (see plot.type)

forest.ci

A vector of numeric values, specifying the required quantiles for forest plot (see plot.type). Default is c(0.025,0.5,0.975).

multip

A logical value that specifies if multiple parameter histograms will be generated on one page. Default is TRUE.

outpdf

A logical value that specifies if output will be generated as .pdf file. Default is TRUE.

scale

A character string that specifies "log" if log scale is required for observation versus prediction plots or individual plots. Default is NULL.

sel.ID

A numeric value that specifies the subject ID for dynamic individual plot. See plot.type

sparname

A vector specifying the parameters to be plotted on forest plot. See plot.type

Details

Working directory should be set to the folder containing Phoenix NLME output. Graphical output (*pdf) are copied to Results folder within working directory.

Value

Returns plots.

Author(s)

Chay Ngee Lim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## Residual plots for Model 1 
## Setting working directory
#setwd("C:/Program Files (x86)/Pharsight/Phoenix/application/Examples/NLME Command Line/Model 1")
#phxplot(plot.type="residual.scatter",outpdf=FALSE)

## Residual plots for example 1
## Loading example 1 database
data(ex1phxd)
ex1=ex1phxd

phxplot(phxd=ex1,plot.type="residual.scatter",outpdf=FALSE)

## Observations versus prediction plots
phxplot(phxd=ex1,plot.type="obs.pred",outpdf=FALSE)

## Observations versus prediction plots on double log scale
phxplot(phxd=ex1,plot.type="obs.pred",scale="log",outpdf=FALSE) 

## Correlation of parameters
phxplot(phxd=ex1,plot.type="correlation",outpdf=FALSE) 

## Histograms of parameters
phxplot(phxd=ex1,plot.type="param",outpdf=FALSE) 

phxplot(phxd=ex1,plot.type="param.contcov",cont.cov="WT",outpdf=FALSE) 

## Individual fits on log y scale
phxplot(phxd=ex1,plot.type="ind",scale="log",outpdf=FALSE)

## Dynamic plot of individual fit; requires Rstudio
#phxplot(phxd=ex1,plot.type="ind.dynamic",sel.ID=39) 

## QQ plots of parameters
phxplot(phxd=ex1,plot.type="qq",outpdf=FALSE)

## Forest plots and boxplots of parameters versus categorical covariates for Model 1
#setwd("C:/Program Files (x86)/Pharsight/Phoenix/application/Examples/NLME Command Line/Model 1")
#phxplot(plot.type="forest",cat.cov=c("sex","age"),sparname=c("E0","EMAX")) 
#phxplot(plot.type="param.catcov",cat.cov=c("sex","dose")) 

Example output

Warning messages:
1: In max(r1$panel$ranges[[1]]$y.range) :
  no non-missing arguments to max; returning -Inf
2: In max(r1$panel$ranges[[1]]$y.range) :
  no non-missing arguments to max; returning -Inf

Phxnlme documentation built on May 1, 2019, 7:31 p.m.