Description Usage Arguments Value Examples
prepare data for sfpca model
1 2 3 4 5 6 7 8 9 10 |
data |
target longitudinal data for analysis (must be a data frame) |
unique_subject_id |
the column name corresponding to unique subject id in the data (string) |
time_name |
the column name corresponding to the time variable in the data (string) |
response_name |
the column name of the intersted response variable (string) |
transform_y |
the ways of transforming the response variable: standardize/center/NULL |
scale_time |
the option of whether or not to scale the time variable to be within 0, 1 (True/False) |
group_name |
the column name of group id, set to NA if no input |
average |
the option to average duplicate response values |
A list containing the prepared data for sfpca model
1 2 3 4 | data("ECAM")
ECAM <- ECAM[!duplicated(ECAM[, c('studyid', 'month_of_life')]), ]
dat <- prepare_data(ECAM, unique_subject_id = 'studyid', time_name = 'month_of_life',
response_name = 'shannon', transform_y='standardize', scale_time=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.