SaemixData-class function

Class "SaemixData"

Class "SaemixData"

An object of the SaemixData class, representing a longitudinal data structure, used by the SAEM algorithm. class

Slots

  • name.data: Object of class "character": name of the dataset
  • header: Object of class "logical": whether the dataset/file contains a header. Defaults to TRUE
  • sep: Object of class "character": the field separator character
  • na: Object of class "character": a character vector of the strings which are to be interpreted as NA values
  • messages: Object of class "logical": if TRUE, the program will display information about the creation of the data object
  • automatic: Object of class "logical": if TRUE, automatic name recognition is on (used at the creation of the object)
  • name.group: Object of class "character": name of the column containing the subject id
  • name.predictors: Object of class "character": name of the column(s) containing the predictors
  • name.response: Object of class "character": name of the column containing the response variable y modelled by predictor(s) x
  • name.covariates: Object of class "character": name of the column(s) containing the covariates, if present (otherwise empty)
  • name.X: Object of class "character": name of the column containing the regression variable to be used on the X axis in the plots
  • name.mdv: Object of class "character": name of the column containing the indicator variable denoting missing data
  • name.cens: Object of class "character": name of the column containing the indicator variable denoting censored data (the value in the name.response column will be taken as the censoring value)
  • name.occ: Object of class "character": name of the column containing the value of the occasion
  • name.ytype: Object of class "character": name of the column containing the response number
  • trans.cov: Object of class "list": the list of transformation applied to the covariates (currently unused, TODO)
  • units: Object of class "list": list with up to three elements, x, y and optionally covariates, containing the units for the X and Y variables respectively, as well as the units for the different covariates
  • data: Object of class "data.frame": dataframe containing the data, with columns for id (name.group), predictors (name.predictors), response (name.response), and covariates if present in the dataset (name.covariates). A column "index" contains the subject index (used to map the subject id). The column names, except for the additional column index, correspond to the names in the original dataset.
  • N: Object of class "numeric": number of subjects
  • yorig: Object of class "numeric": response data, on the original scale. Used when the error model is exponential
  • ocov: Object of class "data.frame": original covariate data (before transformation in the algorithm)
  • ind.gen: Object of class "logical": indicator for genetic covariates (internal)
  • ntot.obs: Object of class "numeric": total number of observations
  • nind.obs: Object of class "numeric": vector containing the number of observations for each subject

Objects from the Class

An object of the SaemixData class can be created by using the function saemixData and contain the following slots:

Methods

  • [<-: signature(x = "SaemixData"): replace elements of object
  • [: signature(x = "SaemixData"): access elements of object
  • initialize: signature(.Object = "SaemixData"): internal function to initialise object, not to be used
  • plot: signature(x = "SaemixData"): plot the data
  • print: signature(x = "SaemixData"): prints details about the object (more extensive than show)
  • read: signature(object = "SaemixData"): internal function, not to be used
  • showall: signature(object = "SaemixData"): shows all the elements in the object
  • show: signature(object = "SaemixData"): prints details about the object
  • summary: signature(object = "SaemixData"): summary of the data. Returns a list with a number of elements extracted from the dataset (N: the number of subjects; nobs: the total number of observations; nind.obs: a vector giving the number of observations for each subject; id: subject ID; x: predictors; y: response, and, if present in the data, covariates: the covariates (as many lines as observations) and ind.covariates: the individual covariates (one line per individual).
  • subset: signature(object = "SaemixData"): extract part of the data; this function will operate on the rows of the dataset (it can be used for instance to extract the data corresponding to the first ten subjects)

Examples

showClass("SaemixData") # Specifying column names 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") # Specifying column numbers data(theo.saemix) saemix.data<-saemixData(name.data=theo.saemix,header=TRUE,sep=" ",na=NA, name.group=1,name.predictors=c(2,3),name.response=c(4), name.covariates=5:6, units=list(x="hr",y="mg/L",covariates=c("kg","-")), name.X="Time") # No column names specified, using automatic recognition of column names data(PD1.saemix) saemix.data<-saemixData(name.data=PD1.saemix,header=TRUE, name.covariates=c("gender"),units=list(x="mg",y="-",covariates=c("-")))

References

E Comets, A Lavenu, M Lavielle M (2017). Parameter estimation in nonlinear mixed effect models using saemix, an R implementation of the SAEM algorithm. Journal of Statistical Software, 80(3):1-41.

E Kuhn, M Lavielle (2005). Maximum likelihood estimation in nonlinear mixed effects models. Computational Statistics and Data Analysis, 49(4):1020-1038.

E Comets, A Lavenu, M Lavielle (2011). SAEMIX, an R version of the SAEM algorithm. 20th meeting of the Population Approach Group in Europe, Athens, Greece, Abstr 2173.

See Also

saemixData SaemixModel saemixControl saemix

Author(s)

Emmanuelle Comets emmanuelle.comets@inserm.fr

Audrey Lavenu

Marc Lavielle.

  • Maintainer: Emmanuelle Comets
  • License: GPL (>= 2)
  • Last published: 2024-03-05

Useful links