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


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


ptukey()R語言中的函數用於計算一係列數值的學生化範圍內的累積分布函數(CDF)的值。

用法: ptukey(x, nmeans, df)

參數:
x:數字向量
nmeans:平均數
df:自由度

範例1:


# R Program to compute the value of
# CDF for Studentized Range
  
# Creating a sequence of Numeric values
x <- seq(1, 10, by = 1)
  
# Calling ptukey() Function
y <- ptukey(x, nmeans = 7, df = 5)
y

輸出:

 [1] 0.01416051 0.22099429 0.54676395 0.76823006 0.88284988 0.93871676
 [7] 0.96637587 0.98063547 0.98833593 0.99268670

範例2:


# R Program to compute the value of
# CDF for Studentized Range
  
# Creating a sequence of Numeric values
x <- seq(1, 10, by = 0.2)
  
# Calling ptukey() Function
y <- ptukey(x, nmeans = 8, df = 7)
  
# Plot a graph
plot(y)

輸出:

相關用法


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