希望这不是一个愚蠢的问题,但我很难找出 R 中 p.adjust 的默认调整方法是什么。 ?p.adjust 中没有关于默认方法的任何内容。

我认为这是 Holm 方法,但我找不到说明这一点的文档。

最佳答案

如果您查看 ?p.adjust ,您将看到:

 p.adjust.methods
 # c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY",
 #   "fdr", "none")

因此,没有特别说明的默认值是第一个:“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(...), ...)

我们看到一些函数参数只有一个默认值,比如 bw = "nrd0" 中的 density() ;而有些有一组值,比如
kernel = c("gaussian", "epanechnikov", "rectangular",
                    "triangular", "biweight",
                    "cosine", "optcosine")

density() 中。好吧,无一异常(exception),除非找到特定的用户输入,否则将使用这些默认值的第一个元素。

关于r - R 中 p.adjust 方法的默认方法是什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38130747/

10-12 17:16
查看更多