Description Usage Arguments Details Value See Also Examples
Visualization of multidimensional longitudinal data based on the projection method using the indicator matrix.
1 |
x |
A data frame consisting of categorical data coded in numbers. Its |
object |
A vector of length n samples. The |
time |
A time point of longitudinal data. Accepts a character string that denotes the name of the time variable. |
type |
A type of longitudinal data. |
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–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 (Y_{1}, … ,Y_{T}) are the response variables obtained at time t(=1,… ,T).type = c(long, wide)
obs.coordinate |
A tibble data class of row coordinates. Each row represents row coordinates and the observations corresponding to each row are included in the |
var.coordinate |
The column coordinate. |
Eigen |
Summarize the |
GOF |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.