Calculate the association of a variable across multiple time points.
Value
output of cor.test()
Details
Calculate the association of a variable across multiple time points. It is especially useful when there are three or more time points.
See also
Other correlations:
addText()
,
cor.table()
,
crossTimeCorrelationDF()
,
partialcor.table()
,
vwReg()
Examples
# 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
crossTimeCorrelation(id = "ID", time = "time", variable = "score", data = df)
#>
#> Pearson's product-moment correlation
#>
#> data: fullMatrix$time1 and fullMatrix$time2
#> t = 0.83592, df = 198, p-value = 0.4042
#> alternative hypothesis: true correlation is not equal to 0
#> 95 percent confidence interval:
#> -0.08009842 0.19642652
#> sample estimates:
#> cor
#> 0.05930162
#>