Description Usage Arguments Details Value See Also Examples
Add objects or variables with new information to the two-dimensional VLDA plot proposed for multidimensional longitudinal data.
1 |
fit |
An object returned by vlda() |
add.col |
A data matirx, The type of indicator matrix. Additional data sets in column format. p ≥ 2 |
add.row |
A data matirx, The type of indicator matrix. Additional data sets in row format.
Supplemental data should have the same variable name as |
time.name |
If supplemental data to add contains a time variable, it requires argument a character string that specifies the name of the time variable. |
The longitudinal data inevitably has the characteristic that supplementary data is added such as:
* Outcome variables measured at additional time points, such as T+1, T+2, ... after the last time point T.
* New objects that are not previously measured.
* Other covariates that indicate the characteristics of objects.
Find coordinates representing objects and variables that are added in the VLDA plot already provided, through a method obtain that find coordinates on low-dimensional space for supplementary elements.
... |
Same as the result of vlda |
sup.coordiante |
A tibble data class. The coordinates of the new object created when adding supplemental data to the already provided vlda plot. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #### Supplementary row and column indicator matrix added ####
### long form ###
data(PTSD)
PTSD <- as.data.frame(PTSD)
PTSD[,2:4] <- apply(PTSD[,2:4], 2, function(x) ifelse(x >= 3, 1, 0))
PTSD[,5] <- ifelse(PTSD[,5] >= 6 , 1, 0)
PTSD <- data.frame(lapply(PTSD, function(x) as.factor(x)))
fit <- vlda(x = PTSD, object = "subject", time = "time", type = "long")
data(PTSD_column) # The degree of drinking that may affect PTSD
PTSD_column <- as.matrix(PTSD_column)
data(PTSD_row) # Added to the row, and is intended for 316 patients after 18 months.
PTSD_row <- as.matrix(PTSD_row)
vlda_add(
fit,
add.row = PTSD_row,
add.col = PTSD_column
)
### Wide form ###
data(Depression)
fit2 <- vlda(x = Depression, object = "Case", time = c("1week", "2weeks", "4weeks"), type = "wide")
# Response after 6 weeks and gender were added the columns for 800 existing patients.
data(Depression_column)
Depression_column <- as.matrix(Depression_column)
# 100 patients who took placebo in each group of mild and severe were added to the rows.
data(Depression_row)
Depression_row <- as.matrix(Depression_row)
vlda_add(
fit2,
time.name = "6weeks",
add.row = Depression_row,
add.col = Depression_column
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.