Мне нужно использовать функцию "LenthPlot", чтобы нарисовать график, но я испытываю трудности при правильном использовании этой функции.
Обычаи:
LenthPlot(obj, alpha = 0.05, plt = TRUE, limits = TRUE,
xlab = "factors", ylab = "effects", faclab = NULL, cex.fac = par("cex.lab"),
cex.axis=par("cex.axis"), adj = 1, ...)
Аргумент:
obj
object of class lm or vector with the factor effects.
alpha
numeric. Significance level used for the margin of error (ME) and simultaneous margin of error (SME). See Lenth(1989).
plt
logical. If TRUE, a spikes plot with the factor effects is displayed. Otherwise, no plot is produced.
limits
logical. If TRUE ME and SME limits are displayed and labeled.
xlab
character string. Used to label the x-axis. "factors" as default.
ylab
character string. Used to label the y-axis. "effects" as default.
faclab
list with components idx (numeric vector) and lab (character vector). The idx entries of effects vector (taken from obj) are labelled as lab. The rest of the effect names are blanked. If NULL all factors are labelled using the coefficients' name.
cex.fac
numeric. Character size used for the factor labels.
cex.axis
numeric. Character size used for the axis.
adj
numeric between 0 and 1. Determines where to place the "ME" (margin of error) and the "SME" (simultaneous margin of error) labels (character size of 0.9*cex.axis). 0 for extreme left hand side, 1 for extreme right hand side.
Моя форма данных:
Effects Value
<chr> <dbl>
1 A -0.791
2 B -6.53
3 C -8.20
4 D -6.03
5 AB -10.5
6 AC 1.11
7 AD -1.66
8 BC -0.798
9 BD -4.66
10 CD 4.67
11 ABC -5.77
12 ABD -5.08
13 ACD -0.493
14 BCD 4.41
15 ABCD -2.53
Если я использую
LenthPlot(data623$Value)
тогда
Error in text.default(x[idx], rep(par("usr")[3], length(idx)), labels = names(b)[idx], : no coordinates were supplied
Я действительно благодарен за любые идеи. Благодаря.