npdeData {npde} | R Documentation |
Creates a NpdeData object
Description
This function is used to create a NpdeData object, representing a longitudinal data structure, and fill it with data from a dataframe or a file on disk
Usage
npdeData(name.data,header=TRUE,sep="",na.strings=c(".","NA"),name.group,
name.predictor, name.response, name.covariates,name.cens,name.miss,name.ipred,
units=list(x="",y="",covariates=c()), detect=TRUE,verbose=FALSE)
Arguments
name.data |
name of the file containing the observed data, or a dataframe containing the observed data |
header |
boolean indicating whether the file has a header (a header is mandatory if detect is TRUE) |
sep |
field separator (for files on disk) |
na.strings |
strings to be considered as indicating NA |
name.group |
name/number of the column in the observed data containing the patient ID (if missing and detect is TRUE, columns named id, subject or sujet (regardless of case) will be assumed to contain this information) |
name.predictor |
name/number of the column in the observed data containing the independent variable X (if missing and detect is TRUE, columns named xobs, time, dose, x, temps, tim (regardless of case) will be assumed to contain this information) |
name.response |
name/number of the column in the observed data containing the dependent variable Y (if missing and detect is TRUE, columns named yobs, response, resp, conc, concentration (regardless of case) will be assumed to contain this information) |
name.covariates |
name/number of the column(s) containing covariate information (optional) |
name.cens |
name/number of the column containing information about censored data (cens) (if missing and detect is TRUE, column with a name containing cens (regardless of case) will be assumed to contain this information) |
name.miss |
name/number of the column containing information about missing data (MDV) (if missing and detect is TRUE, column called mdv or miss (regardless of case) will be assumed to contain this information) |
name.ipred |
name/number of the column(s) with individual predictions (ipred) (if missing and detect is TRUE, column with a name containing ipred (regardless of case) will be assumed to contain this information) |
units |
a list with components x, y and cov (optional), specifying the units respectively for the predictor (x), the response (y), and the covariates (a vector of length equal to the number of covariates). Units will default to (-) if not given. |
detect |
a boolean controlling whether automatic recognition of columns in the dataset is on, defaults to TRUE |
verbose |
whether to print warning messages, defaults to FALSE (set to TRUE to check how data is being handled) |
Value
an object of class NpdeData
Author(s)
Emmanuelle Comets <emmanuelle.comets@bichat.inserm.fr>
References
K. Brendel, E. Comets, C. Laffont, C. Laveille, and F. MentrĂ©. Metrics for external model evaluation with an application to the population pharmacokinetics of gliclazide. Pharmaceutical Research, 23:2036–49, 2006.
See Also
Examples
data(theopp)
x<-npdeData(theopp) # Automatic detection
print(x)
x<-npdeData(theopp,name.group="ID",name.predictor="Time",name.response="Conc",
name.covariates=c("Wt"),units=list(x="hr",y="mg/L",covariates="kg")) # Explicit
print(x)