| SaemixData-class {saemix} | R Documentation |
Class "SaemixData"
Description
An object of the SaemixData class, representing a longitudinal data structure, used by the SAEM algorithm.
Slots
name.dataObject of class
"character": name of the datasetheaderObject of class
"logical": whether the dataset/file contains a header. Defaults to TRUEsepObject of class
"character": the field separator characternaObject of class
"character": a character vector of the strings which are to be interpreted as NA valuesmessagesObject of class
"logical": if TRUE, the program will display information about the creation of the data objectautomaticObject of class
"logical": if TRUE, automatic name recognition is on (used at the creation of the object)name.groupObject of class
"character": name of the column containing the subject idname.predictorsObject of class
"character": name of the column(s) containing the predictorsname.responseObject of class
"character": name of the column containing the response variable y modelled by predictor(s) xname.covariatesObject of class
"character": name of the column(s) containing the covariates, if present (otherwise empty)name.XObject of class
"character": name of the column containing the regression variable to be used on the X axis in the plotsname.mdvObject of class
"character": name of the column containing the indicator variable denoting missing dataname.censObject 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.occObject of class
"character": name of the column containing the value of the occasionname.ytypeObject of class
"character": name of the column containing the response numbertrans.covObject of class
"list": the list of transformation applied to the covariates (currently unused, TODO)unitsObject 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 covariatesdataObject 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.NObject of class
"numeric": number of subjectsyorigObject of class
"numeric": response data, on the original scale. Used when the error model is exponentialocovObject of class
"data.frame": original covariate data (before transformation in the algorithm)ind.genObject of class
"logical": indicator for genetic covariates (internal)ntot.obsObject of class
"numeric": total number of observationsnind.obsObject 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 datasignature(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
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("-")))