當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


R語言 dwilcox()用法及代碼示例


dwilcox()R 語言中的函數用於計算一係列數值上 Wilcoxonrank 和統計分布的概率密度函數 (PDF) 的值。

用法: dwilcox(x, m, n)

參數:
x:數字向量
m:更大的樣本量
n:較小的樣本量

範例1:


# R Program to compute the value of
# PDF over Wilcoxonrank Sum Distribution
  
# Creating a sequence of x-values
x <- seq(1, 10, by = 1)
  
# Calling dwilcox() Function
y <- dwilcox(x, m = 10, n = 5)
y

輸出:

 [1] 0.0003330003 0.0006660007 0.0009990010 0.0016650017 0.0023310023
 [6] 0.0033300033 0.0043290043 0.0059940060 0.0076590077 0.0099900100

範例2:


# R Program to compute the value of
# PDF over Wilcoxonrank Sum Distribution
  
# Creating a sequence of x-values
x <- seq(1, 50, by = 1)
  
# Calling dwilcox() Function
y <- dwilcox(x, m = 30, n = 10)
  
# Plot a graph
plot(y)

輸出:

相關用法


注:本文由純淨天空篩選整理自nidhi_biet大神的英文原創作品 Compute the value of PDF over Wilcoxon Rank Sum Distribution in R Programming – dwilcox() Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。