Ich möchte gerne Level-1 und Level-2 Korrelationen mit R berechnen.
Ich habe den Befehl multilevel.cor aus dem misty Paket entdeckt, welche in der Rohform wie folgt aussieht:
Code: Alles auswählen
multilevel.cor(x, cluster, within = NULL, between = NULL, estimator = c("ML", "MLR"),
missing = c("listwise", "fiml"), sig = FALSE, alpha = 0.05,
print = c("all", "cor", "se", "stat", "p"), split = FALSE,
tri = c("both", "lower", "upper"), tri.lower = TRUE,
p.adj = c("none", "bonferroni", "holm", "hochberg", "hommel",
"BH", "BY", "fdr"), digits = 2, p.digits = 3,
as.na = NULL, write = NULL, check = TRUE, output = TRUE)
Code: Alles auswählen
multilevel.cor(data_C_B[, c("age", "gesch","workexp", "kids", "F_HO", "F_whours", "S_whours", "GW", "GAB", "ERB", "RC", "CO", "GAF", "DET", "MA")],
cluster = data_C_B$ID,
split = TRUE,
within = c("RC", "CO", "GAF", "DET", "CON", "MA"),
between = c("age", "gesch", "workexp", "kids", "F_HO", "F_whours", "S_whours", "GW", "GAB", "ERB"),
estimator = c("ML"),
missing = c("fiml"),
sig = TRUE,
alpha = 0.05,
print = c("corr", "p"),
split = TRUE,
tri = c("both"),
tri.lower = TRUE,
as.na ("-9"),
p.adj = c("none”))
Code: Alles auswählen
multilevel.cor(data_C_B[, c("age"
> cluster = data_C_B$ID,
Error: unexpected ',' in " cluster = data_C_B$ID,"
> split = TRUE,