SaemixData-class: Class "SaemixData"

Description Slots Objects from the Class Methods Author(s) References See Also Examples

Description

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

Slots

name.data

Object of class "character": name of the dataset @slot header Object of class "logical": whether the dataset/file contains a header. Defaults to TRUE @slot sep Object of class "character": the field separator character @slot na Object of class "character": a character vector of the strings which are to be interpreted as NA values @slot messages Object of class "logical": if TRUE, the program will display information about the creation of the data object @slot automatic Object of class "logical": if TRUE, automatic name recognition is on (used at the creation of the object) @slot name.group Object of class "character": name of the column containing the subject id @slot name.predictors Object of class "character": name of the column(s) containing the predictors @slot name.response Object of class "character": name of the column containing the response variable y modelled by predictor(s) x @slot name.covariates Object of class "character": name of the column(s) containing the covariates, if present (otherwise empty) @slot name.X Object of class "character": name of the column containing the regression variable to be used on the X axis in the plots @slot name.mdv Object of class "character": name of the column containing the indicator variable denoting missing data @slot 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) @slot name.occ Object of class "character": name of the column containing the value of the occasion @slot name.ytype Object of class "character": name of the column containing the response number @slot trans.cov Object of class "list": the list of transformation applied to the covariates (currently unused, TODO) @slot 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 @slot 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. @slot N Object of class "numeric": number of subjects @slot yorig Object of class "numeric": response data, on the original scale. Used when the error model is exponential @slot ocov Object of class "data.frame": original covariate data (before transformation in the algorithm) @slot ind.gen Object of class "logical": indicator for genetic covariates (internal) @slot ntot.obs Object of class "numeric": total number of observations @slot 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)

Author(s)

Emmanuelle Comets emmanuelle.comets@inserm.fr

Audrey Lavenu

Marc Lavielle.

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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("-")))

saemix documentation built on Feb. 8, 2022, 5:13 p.m.