| SaemixData-class | R Documentation |
An object of the SaemixData class, representing a longitudinal data structure, used by the SAEM algorithm.
name.dataObject of class "character": name of the dataset
headerObject of class "logical": whether the dataset/file contains a header. Defaults to TRUE
sepObject of class "character": the field separator character
naObject of class "character": a character vector of the strings which are to be interpreted as NA values
messagesObject of class "logical": if TRUE, the program will display information about the creation of the data object
automaticObject 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 id
name.predictorsObject of class "character": name of the column(s) containing the predictors
name.responseObject of class "character": name of the column containing the response variable y modelled by predictor(s) x
name.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 plots
name.mdvObject of class "character": name of the column containing the indicator variable denoting missing data
name.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 occasion
name.ytypeObject of class "character": name of the column containing the response number
trans.covObject of class "list": the list of transformations leading to the new covariate # note: there could be a covariate class
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 covariates
dataObject 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 subjects
yorigObject of class "numeric": response data, on the original scale. Used when the error model is exponential
ocovObject 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 observations
nind.obsObject of class "numeric": vector containing the number of observations for each subject
An object of the SaemixData class can be created by using the function saemixData and contain the following slots:
signature(x = "SaemixData"): replace elements of object
signature(x = "SaemixData"): access elements of object
signature(.Object = "SaemixData"): internal function to initialise object, not to be used
signature(x = "SaemixData"): plot the data
signature(x = "SaemixData"): prints details about the object (more extensive than show)
signature(object = "SaemixData"): internal function, not to be used
signature(object = "SaemixData"): shows all the elements in the object
signature(object = "SaemixData"): prints details about the object
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).
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)
Emmanuelle Comets emmanuelle.comets@inserm.fr
Audrey Lavenu
Marc Lavielle.
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.
saemixData SaemixModel saemixControl saemix
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("-")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.