简体   繁体   English

python函数计算TLS回归斜率的第5和第95置信区间。

[英]python function to calculate 5th and 95th confidence intervals of TLS regression slope.

I know the statsmodels function for simple ordinary least squares (OLS) can calculate confidence intervals on the parameters. 我知道简单的普通最小二乘法(OLS)的statsmodels函数可以计算参数的置信区间 Is there a python function that can do the same but for Total Least Squares (TLS)? 是否有python函数可以执行相同操作,但适用于总最小二乘(TLS)?

a = [2,3,4,5,2,4,5,4,2,2,1,8,9]

mean_a = numpy.mean(a)
std_a = numpy.std(a)

conf_int = scipy.stats.norm.interval(0.95, loc=mean_a, scale=std_a)

print(conf_int)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何用 Python 中的第 95 个和第 5 个百分位数替换异常值? - How to replace the outliers with the 95th and 5th percentile in Python? 使用 python 计算第 95 个百分位插值值 - Calculate 95th Percentile Interpolation value using python 如何使用 numpy 计算表格的第 95 个百分位数? - How can I calculate the 95th percentile over a table with numpy? Python:将数据与正在运行的 window 数据集的第 95 个百分位数进行比较 - Python: Compare data against the 95th percentile of a running window dataset Python 创建列以存储 groupby 后某些值的第 95 个百分位数的平均值 - Python create column to store mean of 95th percentile after groupby for certain values 如何在python的线性回归模型中计算斜率的99%置信区间? - How to calculate the 99% confidence interval for the slope in a linear regression model in python? 在Python中打印第5个字 - print 5th word in Python 在 Python 中绘制 GP 95% 置信区间 - Plotting GP 95% confidence intervals in Python Python 中具有连续四阶和五阶导数的平滑样条? - Smoothing spline with continuous 4th and 5th order derivatives in Python? 正在阅读 Python 中的第 5 个 TIFF 频道? - Reading 5th TIFF's channel in Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM