‘壹’ 求助高手matlab的极大似然估计问题(mle)求解
[phat,pci] = mle(data,'lognormal');
data 是这一组数据,'lognormal'的意思是对数正态分布,phat 为参数, pci是一个上界和一个下界,是phat的95%的置信区间
‘贰’ 急求matlab用极大似然估计求解威布尔估计的两个参数的步骤及代码(有注释最好),谢谢
[phat,pci] = mle(data,'lognormal');
data 是这一组数据,'lognormal'的意思是对数正态分布,phat 为参数,pci是一个上界和一个下界,是phat的95%的置信区间!
‘叁’ 二项分布的极大似然估计怎么求
二项分布就是n个两点分布,两点分布的概率是P=p^x*(1-p)^(1-x),所以似然函数 L=p^∑Xi*(1-p)^(n-∑Xi),构造 lnL=∑Xi*lnp+(n-∑Xi) ln(1-p),对p进行求导,令其结果等于0,就是∑Xi/p+(n-∑Xi)/(1-p)=0,通分后令分母等于0,可以得到p=(∑Xi)/n
求极大似然函数估计值的一般步骤:
(1) 写出似然函数;
(2) 对似然函数取对数,并整理;
(3) 求导数;
(4) 解似然方程 。
(3)加权极大似然估计求参数命令扩展阅读:
极大似然估计只是一种粗略的数学期望,要知道它的误差大小还要做区间估计。极大似然估计是建立在这样的思想上:已知某个参数能使这个样本出现的概率最大,我们当然不会再去选择其他小概率的样本,所以干脆就把这个参数作为估计的真实值。
极大似然估计,只是一种概率论在统计学的应用,它是参数估计的方法之一。说的是已知某个随机样本满足某种概率分布,但是其中具体的参数不清楚,参数估计就是通过若干次试验,观察其结果,利用结果推出参数的大概值。
‘肆’ 极大似然估计求出广义极值分布中的参数在sas中怎么实现
proc genmod data = eyestudy;
class carrot id;
model lenses = carrot/ dist = poisson link = log;
repeated subject = id/ type = unstr;
estimate 'Beta' carrot 1 -1/ exp;*此步骤输出RR值;
run;
‘伍’ 极大似然估计中参数标准差怎么估计
L(θ,c)=∏f(xi)(i=1,2,…,n)(x>=c)
然后对取L(θ,c)的对数,再对L(θ,c)求分别求偏导,令它=0,即可得出θ,c与x1,x2,…,xn的关系,根据实际意义选取合适的值;下面是具体步骤:
先写出L(θ,c)=f(x1)*f(x2)…f(xn)
Ln(L)=-nLnθ-(1/θ)(∑xi-nc)
2.对c求偏导=n/θ>0;
而由题意有x>=c,所以c的极大似然估计量为min(x1,x2,…,xn)
3.对θ求偏导,=-(n/θ)+(1/θ^2)(∑xi-nc)
令它=0,所以θ=(1/n)(∑xi)-c
4.综合上面所述,所以c的极大似然估计量为min(xi)
θ的极大似然估计量为(1/n)(∑xi)-min(xi)
‘陆’ 设总体 的密度函数f(x)=(a+1)*x^a,0<x<1 试分别用矩估计法和极大似然估计法求参数 a的估计。
解题过程如下图:
如果概率密度函数fX(x)在一点x上连续,那么累积分布函数可导。
由于随机变量X的取值 只取决于概率密度函数的积分,所以概率密度函数在个别点上的取值并不会影响随机变量的表现。更准确来说,如果一个函数和X的概率密度函数取值不同的点只有有限个、可数无限个或者相对于整个实数轴来说测度为0(是一个零测集),那么这个函数也可以是X的概率密度函数。
连续型的随机变量取值在任意一点的概率都是0。作为推论,连续型随机变量在区间上取值的概率与这个区间是开区间还是闭区间无关。要注意的是,概率P{x=a}=0,但{X=a}并不是不可能事件。
‘柒’ 请问,如果利用最大似然法求模型参数(在MATLAB中)
有啊,看帮助文件吧。
>>help mle
MLE Maximum likelihood estimation.
PHAT = MLE(DATA) returns maximum likelihood estimates (MLEs) for the
parameters of a normal distribution, computed using the sample data in
the vector DATA.
[PHAT, PCI] = MLE(DATA) returns MLEs and 95% confidence intervals for
the parameters.
[...] = MLE(DATA,'distribution',DIST) computes parameter estimates for
the distribution specified by DIST. DIST is a character string
containing the name of one of the distributions supported by MLE.
[...] = MLE(DATA, ..., 'NAME1',VALUE1,'NAME2',VALUE2,...) specifies
optional argument name/value pairs chosen from the following list.
Argument names are case insensitive and partial matches are allowed.
Name Value
'censoring' A boolean vector of the same size as DATA,
containing ones when the corresponding elements of
DATA are right-censored observations and zeros when
the corresponding elements are exact observations.
Default is all observations observed exactly.
Censoring is not supported for all distributions.
'frequency' A vector of the same size as DATA, containing
non-negative integer frequencies for the corresponding
elements in DATA. Default is one observation per
element of DATA.
'alpha' A value between 0 and 1 specifying a confidence level
of 100*(1-alpha)% for PCI. Default is alpha=0.05 for
95% confidence.
'ntrials' A scalar, or a vector of the same size as DATA,
containing the total number of trials for the
corresponding element of DATA. Applies only to the
binomial distribution.
'options' A structure created by a call to STATSET, containing
numerical options for the fitting algorithm. Not
applicable to all distributions.
MLE can also fit a custom distribution that you define using
distribution functions, in one of three ways:
[...] = MLE(DATA,'pdf',PDF,'cdf',CDF,'start',START,...) returns MLEs
for the parameters of the distribution defined by the probability
density and cumulative distribution functions PDF and CDF. PDF and CDF
are function handles created using @. They accept as inputs a vector
of data and one or more indivial distribution parameters, and return
vectors of probability density values and cumulative probability
values, respectively. If the 'censoring' name/value pair is not
present, you may omit the 'cdf' name/value pair. MLE computes the
estimates by numerically maximizing the distribution's log-likelihood,
and START is a vector containing initial values for the parameters.
[...] = MLE(DATA,'logpdf',LOGPDF,'logsf',LOGSF,'start',START,...)
returns MLEs for the parameters of the distribution defined by the log
probability density and log survival functions LOGPDF and LOGSF. LOGPDF
and LOGSF are function handles created using @. They accept as inputs
a vector of data and one or more indivial distribution parameters,
and return vectors of logged probability density values and logged
survival function values, respectively. This form is sometimes more
robust to the choice of starting point than using PDF and CDF
functions. If the 'censoring' name/value pair is not present, you may
omit the 'logsf' name/value pair. START is a vector containing initial
values for the distribution's parameters.
[...] = MLE(DATA,'nloglf',NLOGLF,'start',START,...) returns MLEs for
the parameters of the distribution whose negative log-likelihood is
given by NLOGLF. NLOGLF is a function handle specified using @, that
accepts the four input arguments
PARAMS - a vector of distribution parameter values
DATA - a vector of data
CENS - a boolean vector of censoring values
FREQ - a vector of integer data frequencies
NLOGLF must accept all four arguments even if you do not supply the
'censoring' or 'frequency' name/value pairs (see above). However,
NLOGLF can safely ignore its CENS and FREQ arguments in that case.
NLOGLF returns a scalar negative log-likelihood value and, optionally,
a negative log-likelihood gradient vector (see the 'GradObj' STATSET
parameter below). START is a vector containing initial values
for the distribution's parameters.
PDF, CDF, LOGPDF, LOGSF, or NLOGLF can also be cell arrays whose first
element is a function handle as defined above, and whose remaining
elements are additional arguments to the function. MLE places these
arguments at the end of the argument list in the function call.
The following optional argument name/value pairs are valid only when
'pdf' and 'cdf', 'logpdf' and 'logcdf', or 'nloglf' are given.
'lowerbound' A vector the same size as START containing lower bounds
for the distribution parameters. Default is -Inf.
'upperbound' A vector the same size as START containing upper bounds
for the distribution parameters. Default is Inf.
'optimfun' A string, either 'fminsearch' or 'fmincon', naming the
optimization function to be used in maximizing the
likelihood. Default is 'fminsearch'. You may only
specify 'fmincon' if the Optimization Toolbox is
available.
When fitting a custom distribution, use the 'options' parameter to
control details of the maximum likelihood optimization. See
STATSET('mlecustom') for parameter names and default values. MLE
interprets the following STATSET parameters for custom distribution
fitting as follows:
'GradObj' 'on' or 'off', indicating whether or not FMINCON
can expect the function provided with the 'nloglf'
name/value pair to return the gradient vector of the
negative log-likelihood as a second output. Default
is 'off'. Ignored when using FMINSEARCH.
'DerivStep' The relative difference used in finite difference
derivative approximations when using FMINCON, and
'GradObj' is 'off'. May be a scalar, or the same
size as START. EPS^(1/3) by default. Ignored when
using FMINSEARCH.
'FunValCheck' 'on' or 'off', indicating whether or not MLE should
check the values returned by the custom distribution
functions for validity. Default is 'on'. A poor
choice of starting point can sometimes cause these
functions to return NaNs, infinite values, or out of
range values if they are written without suitable
error-checking.
'TolBnd' An offset for upper and lower bounds when using
FMINCON. MLE treats upper and lower bounds as
strict inequalities (i.e., open bounds). With
FMINCON, this is approximated by creating closed
bounds inset from the specified upper and lower
bounds by TolBnd. Default is 1e-6.
‘捌’ 求参数的极大似然估计(要详细步骤)谢谢