希望这不是一个愚蠢的问题,但我很难找出 R 中默认调整方法的用途。默认方法p.adjust中没有任何内容。?p.adjust
我认为这是霍尔姆方法,但我找不到表明这一点的文档。
如果你看一下?p.adjust,你会看到:
p.adjust.methods
# c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY",
# "fdr", "none")
Run Code Online (Sandbox Code Playgroud)
因此,如果没有特别指定,默认值是第一个:“holm”。
我认为这个问题确实与 R 如何获取默认函数参数值有关。我将展示一些我熟悉的功能:
density(x, bw = "nrd0", adjust = 1,
kernel = c("gaussian", "epanechnikov", "rectangular",
"triangular", "biweight",
"cosine", "optcosine"),
weights = NULL, window = kernel, width,
give.Rkern = FALSE,
n = 512, from, to, cut = 3, na.rm = FALSE, ...)
ksmooth(x, y, kernel = c("box", "normal"), bandwidth = 0.5,
range.x = range(x),
n.points = max(100L, length(x)), x.points)
loess(formula, data, weights, subset, na.action, model = FALSE,
span = 0.75, enp.target, degree = 2,
parametric = FALSE, drop.square = FALSE, normalize = TRUE,
family = c("gaussian", "symmetric"),
method = c("loess", "model.frame"),
control = loess.control(...), ...)
Run Code Online (Sandbox Code Playgroud)
我们看到某些函数参数只有一个默认值,bw = "nrd0"例如density(); 而有些则有一组价值观,例如
kernel = c("gaussian", "epanechnikov", "rectangular",
"triangular", "biweight",
"cosine", "optcosine")
Run Code Online (Sandbox Code Playgroud)
在density()。好吧,无一例外,除非找到特定的用户输入,否则将使用这些默认值的第一个元素。