I have a dataset that I know for sure that has some sort of skewness (and potentially excess kurtosis). I would like to fit this dataset to some sort of distribution, and I thought the most simplistic is to have a skewed student's t-distribution or skewed normal distribution. What sort of distribution in Matlab can I fit the data to?
我有一个数据集,我确信它有某种偏倚(和潜在的过度峰度)。我想将这个数据集与某种分布相匹配,我认为最简单的方法是有一个倾斜的学生的t分布或正态分布。在Matlab中,我可以将数据拟合成什么样的分布?
Thanks! L.
谢谢!l
1 个解决方案
#1
1
There may be no pearspdf
function in Matlab, because the seven distribution types of the Pearson distribution mostly correspond to or are based on extant functions for other distributions:
在Matlab中可能没有pearspdf函数,因为皮尔逊分布的七种分布类型主要对应或基于其他分布的现存函数:
- Type 0: Normal distribution,
normpdf
- 类型0:正态分布,normpdf
- Type I: Beta distribution,
betapdf
- 类型I: Beta发行版,betapdf。
- Type II: Student's t-distribution,
tpdf
- 类型二:学生的t分布,tpdf
- Type III: Gamma distribution,
gampdf
- 类型III:伽玛分布,gampdf
- Type IV: Not related to any standard distribution
- 类型IV:与任何标准分布无关
- Type V: Inverse gamma distribution, Calculated via
gampdf
- 类型V:逆伽马分布,通过gampdf计算
- Type VI: F-distribution,
fpdf
- VI型:f分布,fpdf
- Type VII: Student's t-distribution/t location scale distribution,
tpdf
/prob.tLocationScaleDistribution
- 类型VII:学生的t分布/t位置比例分布,tpdf/试用版
The summary above simplifies a lot of course and it would be useful to have one function that calculates your PDF according to the system, like pearsrnd
does for random variate generation. Luckily someone has already done that and posted it on the MathWorks File Exchange: pearspdf
.
上面的摘要当然简化了很多,有一个函数可以根据系统计算PDF,这很有用,就像pearsrnd对随机变量生成所做的那样。幸运的是,有人已经这样做了,并将它发布到MathWorks文件交换:pearspdf。
You can also use the second argument of the pearsrnd
function, which returns the type of the distribution in the Pearson system (see this page for examples). If, for example, it suggests that your data is Type III, you could attempt to fit it directly using gamfit
to estimate the parameter values. gamfit
, and other similarly-names functions, are based on robust maximum-likelihood estimation (MLE).
您还可以使用pearsrnd函数的第二个参数,它返回皮尔逊系统中的分布类型(参见此页的示例)。例如,如果它建议您的数据是Type III,您可以尝试使用gamfit来直接拟合它来估计参数值。gamfit和其他类似名称的函数都基于鲁棒极大似然估计(MLE)。
#1
1
There may be no pearspdf
function in Matlab, because the seven distribution types of the Pearson distribution mostly correspond to or are based on extant functions for other distributions:
在Matlab中可能没有pearspdf函数,因为皮尔逊分布的七种分布类型主要对应或基于其他分布的现存函数:
- Type 0: Normal distribution,
normpdf
- 类型0:正态分布,normpdf
- Type I: Beta distribution,
betapdf
- 类型I: Beta发行版,betapdf。
- Type II: Student's t-distribution,
tpdf
- 类型二:学生的t分布,tpdf
- Type III: Gamma distribution,
gampdf
- 类型III:伽玛分布,gampdf
- Type IV: Not related to any standard distribution
- 类型IV:与任何标准分布无关
- Type V: Inverse gamma distribution, Calculated via
gampdf
- 类型V:逆伽马分布,通过gampdf计算
- Type VI: F-distribution,
fpdf
- VI型:f分布,fpdf
- Type VII: Student's t-distribution/t location scale distribution,
tpdf
/prob.tLocationScaleDistribution
- 类型VII:学生的t分布/t位置比例分布,tpdf/试用版
The summary above simplifies a lot of course and it would be useful to have one function that calculates your PDF according to the system, like pearsrnd
does for random variate generation. Luckily someone has already done that and posted it on the MathWorks File Exchange: pearspdf
.
上面的摘要当然简化了很多,有一个函数可以根据系统计算PDF,这很有用,就像pearsrnd对随机变量生成所做的那样。幸运的是,有人已经这样做了,并将它发布到MathWorks文件交换:pearspdf。
You can also use the second argument of the pearsrnd
function, which returns the type of the distribution in the Pearson system (see this page for examples). If, for example, it suggests that your data is Type III, you could attempt to fit it directly using gamfit
to estimate the parameter values. gamfit
, and other similarly-names functions, are based on robust maximum-likelihood estimation (MLE).
您还可以使用pearsrnd函数的第二个参数,它返回皮尔逊系统中的分布类型(参见此页的示例)。例如,如果它建议您的数据是Type III,您可以尝试使用gamfit来直接拟合它来估计参数值。gamfit和其他类似名称的函数都基于鲁棒极大似然估计(MLE)。