ConfidenceLevel
是 LinearModelFit 和其它拟合函数的选项,它指定生成不同置信及预测区间/带所使用的水平.
更多信息
- ConfidenceLevel 影响与置信区间相关的属性值.
- 缺省设置是 95% 置信水平.
- 该值应该是位于 0 和 1 之间的一个数值.
- 对于某些类型的模型,FittedModel[…][prop,ConfidenceLevel->c] 可以用于提取指定置信水平的属性. »
范例
打开所有单元 关闭所有单元基本范例 (1)
范围 (3)
data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}};lm = LinearModelFit[data, x, x]Estimates at the default 95% level:
lm["ParameterEstimates"]//Query[All, {"BasisFunction", "ConfidenceInterval"}]lm["ParameterEstimates", ConfidenceLevel -> .9]//Query[All, {"BasisFunction", "ConfidenceInterval"}]data = Table[{x, 3 Sin[2x] + RandomReal[{-.2, .2}]}, {x, RandomReal[5, 10]}];nlm = NonlinearModelFit[data, a Sin[b x], {a, b}, x, ConfidenceLevel -> .9]nlm["ParameterConfidenceIntervalTable"]nlm["ParameterConfidenceIntervalTable", ConfidenceLevel -> .95]data = {{0, 1}, {1, 1.5}, {3, 2}, {5, 4}};glm = GeneralizedLinearModelFit[data, x, x, ExponentialFamily -> "InverseGaussian"]glm["ParameterConfidenceIntervalTable", ConfidenceLevel -> .99]应用 (1)
SeedRandom[1];
data = Table[{x, 1.2 Sin[2 x] + RandomReal[{-.2, .2}]}, {x, 10}]nlm = NonlinearModelFit[data, a Sin[b x], {a, b}, x]intervals = Table[Thread@{p, Interval /@ nlm["ParameterConfidenceIntervals", ConfidenceLevel -> p]}, {p, {.8, .85, .9, .95, .99}}]ListPlot[Transpose[intervals], PlotLegends -> {a, b}, PlotTheme -> "Detailed", FrameLabel -> {"ConfidenceLevel", "ConfidenceInterval"}]属性和关系 (1)
ConfidenceLevel 影响所有 FittedModel 属性中的置信水平:
lm = LinearModelFit[Range[5], x ^ 2, x]Query[All, All, "ConfidenceInterval"]@lm[{"MeanPredictions", "SinglePredictions", "ParameterEstimates"}]Query[All, All, "ConfidenceInterval"]@lm[{"MeanPredictions", "SinglePredictions", "ParameterEstimates"}, ConfidenceLevel -> .99]相关指南
-
▪
- 统计模型分析
文本
Wolfram Research (2008),ConfidenceLevel,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ConfidenceLevel.html.
CMS
Wolfram 语言. 2008. "ConfidenceLevel." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/ConfidenceLevel.html.
APA
Wolfram 语言. (2008). ConfidenceLevel. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/ConfidenceLevel.html 年
BibTeX
@misc{reference.wolfram_2026_confidencelevel, author="Wolfram Research", title="{ConfidenceLevel}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ConfidenceLevel.html}", note=[Accessed: 07-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_confidencelevel, organization={Wolfram Research}, title={ConfidenceLevel}, year={2008}, url={https://reference.wolfram.com/language/ref/ConfidenceLevel.html}, note=[Accessed: 07-September-2026]}