Extracts the unique non-time dependent variables per patient, from an unbalanced data set
This function extracts a set of unique variables within a patient, returning a data frame with columns, patient identification and variables selected. Each row corresponds to the data for each individual.
data frame, or matrix, with at least a column of patient identification and a covariate column
vector of column names or column numbers, of the variables (non-time dependent). Cannot have mix of numbers and column names.
column name or column number of the patient identification
This function can be used, when longitudinal data is in the unbalanced format, and it is necessary, for example, to extract the set of unique baseline covariates, or any non-time dependent variables, that in the unbalanced format, are repeated for each observation row. Also, if the original data frame has survival data, this can also be used to extract the survival information from the original data set.
The function returns a data frame with patient identification and covariates selected. Each row corresponds to the data for each individual. Note that, this can be only used for non-time dependent covariates. If extracting unique time dependent covariates, the function gives an error, because it can't select what is the unique covariate.
Ines Sousa (isousa@math..pt)
1 2 3 4
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.