View source: R/responseScore.R
calculateResponseScore | R Documentation |
The function calcuculates a score for biomarker data represented as time blocks. The score is calculated via PCA.
calculateResponseScore( responseDf, idColumn = "PATIENT", blockColumn = "block", sexColumn = NA, responseColumns, confounderColumns = NA )
responseDf |
the data frame that contains the time blocks and the biomarker data per time block |
idColumn |
name of ID column |
blockColumn |
name of time block column |
sexColumn |
name of column that contains sex information (optional). If provided, the score will be adjusted for sex. |
confounderColumns |
names of columns that contain confounders (optional). If provided, the score will be adjusted for these confounders using linear regression |
responseColumn |
names of the columns containing the patient block value for a biomarker (e.g. vector of string names). The score will be based only on these columns. |
the response data frame with an added column phenoScore that shows the computed score
## Not run: results <- read_tsv('../data/responseSpreadsheet.txt') resultsCor <- calculateResponseScore(results,responseColumns = c('sbp','dbp','aerAll','acrAll','egfr'), sexColumn = 'SEX') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.