R中的双向截获测量ANCOVA

R中的双向截获测量ANCOVA,r,statistics,mixed-models,ancova,R,Statistics,Mixed Models,Ancova,我试图在R中运行双向重复测量ANCOVA(混合设计)。 我的数据集如下所示: Sub <- c(1,1,1,1,2,2,2,2,3,3,3,3,...) Medicine <- c(1,1,1,1,2,2,2,2,1,1,1,1,...) # between factor Time <- rep(c(1,2,3,4), #) # within factor age <- c('#', ...) # covariant 1 (int) motion1 <- c('#'

我试图在R中运行双向重复测量ANCOVA(混合设计)。 我的数据集如下所示:

Sub <- c(1,1,1,1,2,2,2,2,3,3,3,3,...)
Medicine <- c(1,1,1,1,2,2,2,2,1,1,1,1,...) # between factor
Time <- rep(c(1,2,3,4), #) # within factor
age <- c('#', ...) # covariant 1 (int)
motion1 <- c('#', ...) # covariant 2 (float)
motion2 <- c('#', ...) # covariant 3 (float)
Score <- c('#',...) # dependent variable.
Sub