我正在进行一项纵向研究,对成千上万的患者有数个观察结果(请参见下面的简短样本;请注意,数据稀疏)。
structure(list(id = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9,
9, 9, 9, 10, 10, 10, 10, 10), x1 = c(0, 0, 0, 0, 0, 5.19354838709677,
0, 0, 0, 0, 120.866666666667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 6.7741935483871, 6.7741935483871, 0, 0, NA, NA,
0, 0, 0, 0, 0, 0, 0, 0, 0), x2 = c(0, 0, 0, 0, 0, 0.451612903225806,
0, 0, 0, 0, 2.56666666666667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.225806451612903, 0.225806451612903, 0, 0, NA,
NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x3 = c(0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x4 = c(0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x5 = c(0,
0, 0, 0, 0, 37.7096774193548, 10.1612903225806, 20.3225806451613,
14, 0, 0, 19.8333333333333, 83.75, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 3.38709677419355, 3.38709677419355, 0, 0, NA,
NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x6 = c(0, 0, 0, 0, 0, 2.93548387096774,
0.225806451612903, 0.67741935483871, 0.233333333333333, 0, 0,
1.16666666666667, 1.75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.225806451612903, 0.225806451612903, 0, 0, NA, NA, 0, 0,
0, 0, 0, 0, 0, 0, 0), x7 = c(0, 0, 0, 0, 0, 3.61290322580645,
12.4193548387097, 0.451612903225806, 4.66666666666667, 0, 44.1,
0, 3.75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.51612903225806,
1.12903225806452, 0, 0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x8 = c(0,
0, 0, 0, 0, 0.451612903225806, 1.12903225806452, 0.225806451612903,
0.7, 0, 2.8, 0, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0.67741935483871, 0.225806451612903, 0, 0, NA, NA, 0, 0, 0, 0,
0, 0, 0, 0, 0), x9 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NA, NA,
0, 0, 0, 0, 0, 0, 0, 0, 0), x10 = c(0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x11 = c(0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x12 = c(0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0),
x13 = c(0, 0, 0, 0, 0, 1.80645161290323, 0, 0, 0, 0, 9.33333333333333,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x14 = c(0, 0, 0, 0,
0, 0.225806451612903, 0, 0, 0, 0, 0.466666666666667, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NA,
NA, 0, 0, 0, 0, 0, 0, 0, 0, 0), x15 = c(0, 0, 0, 0, 0, 3.61290322580645,
1.12903225806452, 40.1935483870968, 2.33333333333333, 0,
2.33333333333333, 0, 2.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0),
x16 = c(0, 0, 0, 0, 0, 0.451612903225806, 0.225806451612903,
2.93548387096774, 0.466666666666667, 0, 0.233333333333333,
0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, NA, NA, 0, 0, 0, 0, 0, 0, 0, 0, 0)), class = "data.frame", row.names = c(NA,
-42L))
我想进行 混合效应 因子分析,在该分析中会生成负载,以便对每个患者进行重复观察。
这是否已在R中实现(理想情况是在程序包中)?
faMulti
包中的 psych
执行 分层因素分析 ,但这似乎适合于相关因素进行的横截面分析依次考虑因素(例如,当一个比例尺由子比例尺内的构面组成时)。