View source: R/crossTimeCorrelationsDF.R
crossTimeCorrelationDF | R Documentation |
Dataframe used to compute cross-time correlations.
crossTimeCorrelationDF(id = "tcid", time = "age", variable, data)
id |
Name of variable indicating the participant ID. |
time |
Name of variable indicating the timepoint. |
variable |
Name of variable to estimate the cross-time correlation. |
data |
Dataframe. |
Dataframe used to calculate the association of a variable across multiple time points. It is especially useful when there are three or more time points.
dataframe with three columns in the form of: ID
, time1
,
time2
Other correlations:
addText()
,
cor.table()
,
crossTimeCorrelation()
,
partialcor.table()
,
vwReg()
# Prepare Data
df <- expand.grid(ID = 1:100, time = c(1, 2, 3))
df <- df[order(df$ID),]
row.names(df) <- NULL
df$score <- rnorm(nrow(df))
# Cross-Time Correlation
crossTimeCorrelationDF(id = "ID", time = "time", variable = "score", data = df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.