Learn R Programming

saemix (version 0.96.1)

saemix.plot.select: Plots of the results obtained by SAEM

Description

Several plots (selectable by the type argument) are currently available: convergence plot, individual plots, predictions versus observations, distribution plots, residual plots, VPC.

Usage

saemix.plot.select(saemixObject, data = FALSE, convergence = FALSE,
  likelihood = FALSE, individual.fit = FALSE, population.fit = FALSE, 
  both.fit = FALSE, observations.vs.predictions = FALSE,
  residuals.scatter = FALSE, residuals.distribution = FALSE,
  random.effects = FALSE, correlations = FALSE, 
  parameters.vs.covariates = FALSE, randeff.vs.covariates = FALSE, 
  marginal.distribution = FALSE, vpc = FALSE, npde = FALSE, ...)

Arguments

saemixObject
an object returned by the saemix function
data
if TRUE, produce a plot of the data. Defaults to FALSE
convergence
if TRUE, produce a convergence plot. Defaults to FALSE
likelihood
if TRUE, produce a plot of the estimation of the LL by importance sampling. Defaults to FALSE
individual.fit
if TRUE, produce individual fits with individual estimates. Defaults to FALSE
population.fit
if TRUE, produce individual fits with population estimates. Defaults to FALSE
both.fit
if TRUE, produce individual fits with both individual and population estimates. Defaults to FALSE
observations.vs.predictions
if TRUE, produce a plot of observations versus predictions. Defaults to FALSE
residuals.scatter
if TRUE, produce scatterplots of residuals versus predictor and predictions. Defaults to FALSE
residuals.distribution
if TRUE, produce plots of the distribution of residuals. Defaults to FALSE
random.effects
if TRUE, produce boxplots of the random effects. Defaults to FALSE
correlations
if TRUE, produce a matrix plot showing the correlation between random effects. Defaults to FALSE
parameters.vs.covariates
if TRUE, produce plots of the relationships between parameters and covariates, using the Empirical Bayes Estimates of individual parameters. Defaults to FALSE
randeff.vs.covariates
if TRUE, produce plots of the relationships between random effects and covariates, using the Empirical Bayes Estimates of individual random effects. Defaults to FALSE
marginal.distribution
if TRUE, produce plots of the marginal distribution of the random effects. Defaults to FALSE
vpc
if TRUE, produce Visual Predictive Check plots. Defaults to FALSE
npde
if TRUE, produce plots of the npde. Defaults to FALSE
...
optional arguments passed to the plots

Value

  • None

Details

This function plots different graphs related to the algorithm (convergence plots, likelihood estimation) as well as diagnostic graphs. A description is provided in the PDF documentation. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

References

Kuhn, E., and Lavielle, M. Maximum likelihood estimation in nonlinear mixed effects models. Computational Statistics and Data Analysis 49, 4 (2005), 1020-1038. Monolix32_UsersGuide.pdf (http://software.monolix.org/sdoms/software/)

See Also

SaemixObject,saemix, default.saemix.plots, saemix.plot.setoptions, saemix.plot.data, saemix.plot.convergence, saemix.plot.llis, saemix.plot.randeff, saemix.plot.obsvspred, saemix.plot.fits, saemix.plot.parcov, saemix.plot.randeffcov, saemix.plot.distpsi, saemix.plot.scatterresiduals, saemix.plot.distribresiduals, saemix.plot.vpc

Examples

Run this code
data(theo.saemix)

saemix.data<-saemixData(name.data=theo.saemix,header=TRUE,sep="",na=NA, 
  name.group=c("Id"),name.predictors=c("Dose","Time"),
  name.response=c("Concentration"),name.covariates=c("Weight","Sex"),
  units=list(x="hr",y="mg/L",covariates=c("kg","-")), name.X="Time")

model1cpt<-function(psi,id,xidep) { 
	  dose<-xidep[,1]
	  tim<-xidep[,2]  
	  ka<-psi[id,1]
	  V<-psi[id,2]
	  CL<-psi[id,3]
	  k<-CL/V
	  ypred<-dose*ka/(V*(ka-k))*(exp(-k*tim)-exp(-ka*tim))
	  return(ypred)
}

saemix.model<-saemixModel(model=model1cpt,
  description="One-compartment model with first-order absorption", 
  psi0=matrix(c(1.,20,0.5,0.1,0,-0.01),ncol=3, byrow=TRUE,
  dimnames=list(NULL, c("ka","V","CL"))),transform.par=c(1,1,1),
  covariate.model=matrix(c(0,1,0,0,0,0),ncol=3,byrow=TRUE),fixed.estim=c(1,1,1),
  covariance.model=matrix(c(1,0,0,0,1,0,0,0,1),ncol=3,byrow=TRUE),
  omega.init=matrix(c(1,0,0,0,1,0,0,0,1),ncol=3,byrow=TRUE),error.model="constant")

saemix.options<-list(seed=632545,save=FALSE,save.graphs=FALSE)

saemix.fit<-saemix(saemix.model,saemix.data,saemix.options)

saemix.plot.select(saemix.fit,data=TRUE,main="Spaghetti plot of data")

# Putting several graphs on the same plot
par(mfrow=c(2,2))
saemix.plot.select(saemix.fit,data=TRUE,vpc=TRUE,
  observations.vs.predictions=TRUE, new=FALSE)

Run the code above in your browser using DataLab