plot.nlmixr2FitData: Plot a nlmixr2 data object

View source: R/plot.nlmixr2.R

plot.nlmixr2FitDataR Documentation

Plot a nlmixr2 data object

Description

Plot some standard goodness of fit plots for the focei fitted object

Usage

## S3 method for class 'nlmixr2FitData'
plot(x, ...)

Arguments

x

a focei fit object

...

additional arguments

Value

Nothing, called for its side effects

Author(s)

Wenping Wang & Matthew Fidler

Examples



library(nlmixr2est)
## The basic model consiss of an ini block that has initial estimates
one.compartment <- function() {
  ini({
    tka <- 0.45 # Log Ka
    tcl <- 1 # Log Cl
    tv <- 3.45    # Log V
    eta.ka ~ 0.6
    eta.cl ~ 0.3
    eta.v ~ 0.1
    add.sd <- 0.7
  })
  # and a model block with the error sppecification and model specification
  model({
    ka <- exp(tka + eta.ka)
    cl <- exp(tcl + eta.cl)
    v <- exp(tv + eta.v)
    d/dt(depot) = -ka * depot
    d/dt(center) = ka * depot - cl / v * center
    cp = center / v
    cp ~ add(add.sd)
  })
}

## The fit is performed by the function nlmixr/nlmix2 specifying the model, data and estimate
fit <- nlmixr2(one.compartment, theo_sd,  est="saem", saemControl(print=0))

# This shows many goodness of fit plots
plot(fit)



nlmixr2plot documentation built on Oct. 20, 2022, 9:06 a.m.