在 R 编程中计算 CDF 在学生化范围分布上的值 – ptukey()函数
R 语言中的ptukey()
函数用于计算一系列数值在学生化范围内的累积分布函数(CDF) 的值。
Syntax: ptukey(x, nmeans, df)
Parameters:
x: Numeric Vector
nmeans: Number of means
df: Degree of Freedom
示例 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)
输出: