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


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


qweibull()R語言中的函數用於計算威布爾分布的分位數函數值。

用法: qweibull(x, shape)

參數:
x:數字向量
shape:形狀參數

範例1:


# R Program to compute the value of
# Quantile Weibull Function
  
# Creating a sequence of x-values
x <- seq(0, 1, by = 0.2)
  
# Calling qweibull() Function
y <- qweibull(x, shape = 0.5)
y

輸出:

[1] 0.00000000 0.04979304 0.26094282 0.83958871 2.59029039        Inf

範例2:


# R Program to compute the value of
# Quantile Weibull Function
  
# Creating a sequence of x-values
x <- seq(0, 1, by = 0.02)
  
# Calling qweibull() Function
y <- qweibull(x, shape = 0.7)
  
# Plot a graph
plot(y)

輸出:

相關用法


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