主要内容

wblfit

Weibull parameter estimates

描述

example

Parmhat= wblfit(x)返回Weibull分布参数(形状和比例)的估计值,给定样本数据x

example

[Parmhat,parmci] = wblfit(x)also returns the 95% confidence intervals for the parameter estimates.

[Parmhat,parmci] = wblfit(x,alpha)specifies the confidence level for the confidence intervals to be100(1—alpha)%.

[___] = wblfit(x,alpha,censoring)specifies whether each value inxis right-censored or not. Use the logical vectorcensoringin which 1 indicates observations that are right-censored and 0 indicates observations that are fully observed.

[___] = wblfit(x,alpha,censoring,freq)specifies the frequency or weights of observations.

example

[___] = wblfit(x,alpha,censoring,freq,options)specifies optimization options for the iterative algorithmwblfitto use to compute maximum likelihood estimates (MLEs) with censoring. Createoptionsby using the functionStatset

你可以传递[]foralpha,censoring, 和freq使用其默认值。

例子

全部收缩

从微量分布中生成100个随机数0.8和形状3

x = wblrnd(0.8,3,100,1);

Estimate the parameters of the Weibull distribution from the data.

parmhat =wblfit(x)
parmhat =1×20.7751 2.9433

从微量分布中生成100个随机数1和形状2

x = wblrnd(1,2,100,1);

Find the95%confidence intervals estimating the parameters of the Weibull distribution from the data.

[parmHat,parmCI] = wblfit(x)
parmhat =1×20.9536 1.9622
parmci=2×20.8583 1.6821 1.0596 2.2890

这top row ofparmci包含置信区间的下限,底部行包含置信区间的上限。

Generate 100 Weibull random variables from the distribution with scale2和形状5

x = wblrnd(2,5,100,1);

Display the algorithm parameters forwblfit

Statset('wblfit')
ans =带有字段的结构:显示:'Off'MaxFunevals:[] Maxiter:[] Tolbnd:[] Tolfun:[] ToltypeFun:[] Tolx:1.0000e-06 Toltypex:[] Gradobj:[] Jacobian:[] Jacobian:[] derivstep:[] derivstep:[]] robust:[] rubustwgtfun:[] wgtfun:[] tune:[] useparallel:[] useubstreams:[]流:{} outputfcn:[]

Specify algorithm parameters using name-value pair arguments of the functionStatset。更改结果的显示方式(Display),并设置参数的终止公差(TOLX)。

选项= statset('展示','iter','TolX',1e-4);% Optimization options

使用新算法参数找到MLE。

parmhat =wblfit(x,[],[],[],options)
FUNC计数X F(X)程序2 0.193283 -0.0172927初始3 0.205467 0.00262429插值4 0.203862 2.99018E-05 Interpolation 5 0.203862 2.99018e-05 InterPolation in Interpolation in Interpolation in Interpolation in Interpolation in Interpolation in InterpoL Interpolation零[0.19328] 0.19332832832832832283328 ,,
parmhat =1×21.9624 4.9050

wblfitdisplays information about the iterations.

Input Arguments

全部收缩

样本数据, specified as a vector.

Data Types:single|双倍的

置信区间的显着性水平,指定为标量(0,1)的标量。信心水平是100(1—alpha)%, wherealpha是置信区间不包含真实值的概率。

例子:0.01

Data Types:single|双倍的

审查每个值的指标x, specified as a logical vector of the same size asx。Use 1 for observations that are right-censored and 0 for observations that are fully observed.

默认值是0s的数组,这意味着所有观察结果均已完全观察到。

Data Types:logical

观测值的频率或权重,指定为非负数矢量,大小与x。这freq输入参数通常包含针对相应元素的非负整数计数x,但可以包含任何非负值。

要获得具有审查的数据集的加权MLE,请指定观察的权重,并标准化为观测值的数量x

默认值是1s的数组,这意味着每个元素的观察x

Data Types:single|双倍的

优化选项,指定为结构。optionsdetermines the control parameters for the iterative algorithm thatwblfituses to compute MLEs for censored data.

创造optionsby using the functionStatsetor by creating a structure array containing the fields and values described in this table.

字段名称 价值 Default Value
Display

算法显示的信息量。

  • '离开'- 显示没有信息

  • '最后'— Displays the final output

  • 'iter'- 显示迭代输出

'离开'
TOLX

Termination tolerance for the parameters, specified as a positive scalar

1e-8

You can also enterStatset('wblfit')在命令窗口中查看字段的名称和默认值wblfit包括在options结构体。

例子:Statset('Display','iter')specifies to display the information from each step of the iterative algorithm.

Data Types:struct

Output Arguments

全部收缩

估计参数a(比例)和b(形状)Weibull分布,返回为行矢量。

Confidence intervals for the mean parameters of the Weibull distribution, returned as a 2-by-2 matrix vector containing the lower and upper bounds of the100(1—alpha)% confidence interval.

第一行和第二行分别对应于置信区间的下限和上限。

替代功能

wblfit是针对Weibull分布的功能。统计和机器学习工具箱™还提供通用功能mle,fitdist, 和paramci和theDistribution Fitterapp, which support various probability distributions.

  • mlereturns MLEs and the confidence intervals of MLEs for the parameters of various probability distributions. You can specify the probability distribution name or a custom probability density function.

  • 创造aweibulldistribution概率分配对象通过使用该分布拟合到数据fitdist功能或Distribution Fitterapp. The object propertiesabstore the parameter estimates. To obtain the confidence intervals for the parameter estimates, pass the object toparamci

Extended Capabilities

C/C ++代码生成
使用MATLAB®CODER™生成C和C ++代码。

Version History

在R2006a之前引入