
Visualization of multidimensional longitudinal data based on the projection method using the indicator matrix.
vlda(x, object, time, type = c("long", "wide"))
A data frame consisting of categorical data coded in numbers. Its n
samples(object
) should have been repeatedly measured through multiple time points; its p
variables will be represented as variable coordinate. To keep track of which observation occurred in which time point, you must have included a variable, Time
.
A vector of length n samples. The object
who would have made repeatedly measure through multiple time points; the object is indicated by the name of the observation coordinate.
A time point of longitudinal data. Accepts a character string that denotes the name of the time variable.
A type of longitudinal data.
A tibble data class of row coordinates. Each row represents row coordinates and the observations corresponding to each row are included in the obs_list
The column coordinate.
Summarize the principal inertias(Eigenvalues)
that as a result of applying the above algorithm using the indicator matrix
Goodness-of-fit
of the Approximation for 2-dimensional VLDA plot.
The value returned by vlda is using as the main argument of vlda_plot and vlda_add function, the corresponding model.
long-format is that each row is one time point per object
So each object
has T
rows. All T
values for each object
are stacked<U+2013>they're all in the one column; wide-format is that a object
repeated responses will be in a single row, and each response is in a separate column. so type = c(long, wide)
vlda_add
vlda_plot
# NOT RUN {
## longform of the PTSD data
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)))
vlda(x = PTSD, object = "subject", time = "time", type = "long")
## Wideform od the Depression data
data(Depression)
head(Depression)
vlda(Depression, object = "Case", time = c("1week", "2weeks", "4weeks"), type = "wide")
vlda(Depression, "Case", c("1week", "2weeks", "4weeks"), "wide")
# }
Run the code above in your browser using DataLab