statsmodels.regression.linear_model.RegressionResults

2023-11-08

statsmodels.regression.linear_model.RegressionResults

*class statsmodels.regression.linear_model.RegressionResults(model, params, normalized_cov_params=None, scale=1.0, cov_type=‘nonrobust’, cov_kwds=None, use_t=None, *kwargs)[source]

详细的注释回头再写~

This class summarizes the fit of a linear regression model
It handles the output of contrasts, estimates of covariance, etc.

Returns:

  • aic – Akaike’s information criteria. For a model with a constant −2llf+2(df_model+1)−2llf+2(df_model+1). For a model without a constant −2llf+2(df_model)−2llf+2(df_model).
  • bic – Bayes’ information criteria. For a model with a constant −2llf+log(n)(df_model+1)−2llf+log⁡(n)(df_model+1). For a model without a constant −2llf+log(n)(df_model)−2llf+log⁡(n)(df_model)
  • bse – The standard errors of the parameter estimates.
  • pinv_wexog – See specific model class docstring
  • centered_tss – The total (weighted) sum of squares centered about the mean.
  • cov_HC0 – Heteroscedasticity robust covariance matrix. See HC0_se below.
  • cov_HC1 – Heteroscedasticity robust covariance matrix. See HC1_se below.
  • cov_HC2 – Heteroscedasticity robust covariance matrix. See HC2_se below.
  • cov_HC3 – Heteroscedasticity robust covariance matrix. See HC3_se below.
  • cov_type – Parameter covariance estimator used for standard errors and t-stats
  • df_model – Model degrees of freedom. The number of regressors p. Does not include the constant if one is present
  • df_resid – Residual degrees of freedom. n - p - 1, if a constant is present. n - p if a constant is not included.
  • ess – Explained sum of squares. If a constant is present, the centered total sum of squares minus the sum of squared residuals. If there is no constant, the uncentered total sum of squares is used.
  • fvalue – F-statistic of the fully specified model. Calculated as the mean squared error of the model divided by the mean squared error of the residuals.
  • f_pvalue – p-value of the F-statistic
  • fittedvalues – The predicted values for the original (unwhitened) design.
  • het_scale – adjusted squared residuals for heteroscedasticity robust standard errors. Is only available after HC#_se or cov_HC# is called. See HC#_se for more information.
  • history – Estimation history for iterative estimators
  • HC0_se – White’s (1980) heteroskedasticity robust standard errors. Defined as sqrt(diag(X.T X)^(-1)X.T diag(e_i^(2)) X(X.T X)^(-1) where e_i = resid[i] HC0_se is a cached property. When HC0_se or cov_HC0 is called the RegressionResults instance will then have another attribute het_scale, which is in this case is just resid**2.
  • HC1_se – MacKinnon and White’s (1985) alternative heteroskedasticity robust standard errors. Defined as sqrt(diag(n/(n-p)*HC_0) HC1_see is a cached property. When HC1_se or cov_HC1 is called the RegressionResults instance will then have another attribute het_scale, which is in this case is n/(n-p)*resid**2.
  • HC2_se – MacKinnon and White’s (1985) alternative heteroskedasticity robust standard errors. Defined as (X.T X)^(-1)X.T diag(e_i^(2)/(1-h_ii)) X(X.T X)^(-1) where h_ii = x_i(X.T X)^(-1)x_i.T HC2_see is a cached property. When HC2_se or cov_HC2 is called the RegressionResults instance will then have another attribute het_scale, which is in this case is resid^(2)/(1-h_ii).
  • HC3_se – MacKinnon and White’s (1985) alternative heteroskedasticity robust standard errors. Defined as (X.T X)^(-1)X.T diag(e_i(2)/(1-h_ii)(2)) X(X.T X)^(-1) where h_ii = x_i(X.T X)^(-1)x_i.T HC3_see is a cached property. When HC3_se or cov_HC3 is called the RegressionResults instance will then have another attribute het_scale, which is in this case is resid(2)/(1-h_ii)(2).
  • model – A pointer to the model instance that called fit() or results.
  • mse_model – Mean squared error the model. This is the explained sum of squares divided by the model degrees of freedom.
  • mse_resid – Mean squared error of the residuals. The sum of squared residuals divided by the residual degrees of freedom.
  • mse_total – Total mean squared error. Defined as the uncentered total sum of squares divided by n the number of observations.
  • nobs – Number of observations n.
  • normalized_cov_params – See specific model class docstring
  • params – The linear coefficients that minimize the least squares criterion. This is usually called Beta for the classical linear model.
  • pvalues – The two-tailed p values for the t-stats of the params.
  • resid – The residuals of the model.
  • resid_pearson – wresid normalized to have unit variance.
  • rsquared – R-squared of a model with an intercept. This is defined here as 1 - ssr/centered_tss if the constant is included in the model and 1 - ssr/uncentered_tss if the constant is omitted.
  • rsquared_adj – Adjusted R-squared. This is defined here as 1 - (nobs-1)/df_resid * (1-rsquared) if a constant is included and 1 - nobs/df_resid * (1-rsquared) if no constant is included.
  • scale – A scale factor for the covariance matrix. Default value is ssr/(n-p). Note that the square root of scale is often called the standard error of the regression.
  • ssr – Sum of squared (whitened) residuals.
  • uncentered_tss – Uncentered sum of squares. Sum of the squared values of the (whitened) endogenous response variable.
  • wresid – The residuals of the transformed/whitened regressand and regressor(s)

Methods

HC0_se() See statsmodels.RegressionResults

HC1_se() See statsmodels.RegressionResults

HC2_se() See statsmodels.RegressionResults

HC3_se() See statsmodels.RegressionResults

aic()

bic()

bse()

centered_tss()

compare_f_test(restricted) use F test to test whether restricted model is correct

compare_lm_test(restricted[, demean, use_lr]) Use Lagrange Multiplier test to test whether restricted model is correct

compare_lr_test(restricted[, large_sample]) Likelihood ratio test to test whether restricted model is correct

condition_number() Return condition number of exogenous matrix.

conf_int([alpha, cols]) Returns the confidence interval of the fitted parameters.

cov_HC0() See statsmodels.RegressionResults

cov_HC1() See statsmodels.RegressionResults

cov_HC2() See statsmodels.RegressionResults

cov_HC3() See statsmodels.RegressionResults

cov_params([r_matrix, column, scale, cov_p, …]) Returns the variance/covariance matrix.

eigenvals() Return eigenvalues sorted in decreasing order.

ess()

f_pvalue()

f_test(r_matrix[, cov_p, scale, invcov]) Compute the F-test for a joint linear hypothesis.

fittedvalues()

fvalue()

get_prediction([exog, transform, weights, …]) compute prediction results

get_robustcov_results([cov_type, use_t]) create new results instance with robust covariance as default

initialize(model, params, **kwd)

llf()

load(fname) load a pickle, (class method)

mse_model()

mse_resid()

mse_total()

nobs()

normalized_cov_params()

predict([exog, transform]) Call self.model.predict with self.params as the first argument.

pvalues()

remove_data() remove data arrays, all nobs arrays from result and model

resid()

resid_pearson() Residuals, normalized to have unit variance.

rsquared()

rsquared_adj()

save(fname[, remove_data]) save a pickle of this instance

scale()

ssr()

summary([yname, xname, title, alpha]) Summarize the Regression Results

summary2([yname, xname, title, alpha, …]) Experimental summary function to summarize the regression results

t_test(r_matrix[, cov_p, scale, use_t]) Compute a t-test for a each linear hypothesis of the form Rb = q

t_test_pairwise(term_name[, method, alpha, …]) perform pairwise t_test with multiple testing corrected p-values

tvalues() Return the t-statistic for a given parameter estimate.

uncentered_tss()

wald_test(r_matrix[, cov_p, scale, invcov, …]) Compute a Wald-test for a joint linear hypothesis.

wald_test_terms([skip_single, …]) Compute a sequence of Wald tests for terms over multiple columns

wresid()

Attributes

use_t

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

statsmodels.regression.linear_model.RegressionResults 的相关文章

随机推荐

  • [caffe安装]配置环境过程中出现的问题及解决

    今天要跑一下Convolutional Autoencoder for Loop Closure 轻量级神经网络闭环方法 caffe安好之后编译程序出现以下错误 Scanning dependencies of target deeplcd
  • React 之常用组件类型

    无状态组件 主要用于内部没有状态更新操作的组件 同构props进行基本的数据渲染或常量展示 该类组件职责单一 有利于组件的高复用 const PureComponent props gt div props list map txt ind
  • 金融市场概览

    文章目录 金融市场的功能 金融市场的分类 主要金融机构 中国金融市场概况 本文简要展现真实世界中的金融市场的面貌 介绍其基本结构 主要玩家 交易的主要资产 以及主要的业务形式 金融市场的功能 金融是通过交易金融资产来实现资金通融 很容易想到
  • Qt学习笔记3:Qt工程的目录结构

    经过前两篇的学习 已经可以使用Qt空项目模板创建自己的工程了 通过本篇的学习 整理一下如果使用Qt工程的目录结构 使项目更规范和容易管理 当前的目录结构 如图所示 这是前篇中创建的工程 只有main cpp和widget cpp widge
  • postman-接口批量执行、接口串联

    一 接口批量执行 1 点击postman左侧Collections下面有个添加文件夹图标 就可以创建测试项目 2 该目录下还可以创建子目录 进行测试用例的细分 3 创建测试用例 创建接口测试用例 即新建http请求 选择请求方式 写好url
  • 【AUTOSAR】CCP协议的代码分析与解读(四)----CCP协议数据下载和上传

    数据下载 DNLOAD DNLOAD指令负责将CRO中的数据下载到ECU中 起始地址为先前设定的MTA0 下载完毕后MTA0指针自增 自增的字数为下载的字节数 DNLOAD命令的CRO数据场结构 如下所示 位 置 类 型 描 述 0 字节
  • redis&mariadb + keepalived 高可用

    目录 机器准备 安装后服务 redis 安装redis mariadb 安装mariadb 启动和配置 互为主从同步配置 keepalived keepalived安装 修改主从 keepalived的配置 主从配置 mariadb监控 主
  • Java实现数据结构----插入排序直接插入排序

    七大基于比较的排序之插入排序 直接排序 直接插入排序 原理 主要步骤 1 先假设第一个元素已经排好序 2 然后依次取出还需要进行排序的下一个元素 也就是排序完成的元素后面的下一个元素 取出下一个元素 设为待插入元素 在已经排序的元素序列中从
  • MySQL 数据库性能优化之缓存参数优化

    https blog csdn net truelove12358 article details 51956356 博客 学院 下载 图文课 论坛 APP 问答 商城 VIP会员 活动 招聘 ITeye GitChat 写博客 赚零钱 传
  • [构思]依据verilog源文件中的关键代码及其注释,使用脚本命令生成代码文档

    verilog代码文档的内容需求 生成文档的实现思路 依据verilog源文件中的关键代码及其注释 使用脚本命令生成代码文档 跟Doxygen工具功能类似 针对的场景是工程里的代码没有文档 阅读不方便 注释没有章法 代码越长 阅读直观感受越
  • RIP综合实验

    配置IP RI r1 int g 0 0 0 r1 GigabitEthernet0 0 0 ip address 12 0 0 1 24 Apr 6 2022 13 18 35 08 00 r1 01IFNET 4 LINK STATE
  • selenium数据提取学习(1)

    import time from selenium import webdriver 设置浏览器 driver webdriver Edge 控制浏览器访问地址 driver get https www baidu com time sle
  • 【DTale】数据分析强大工具DTale的使用

    简单介绍 使用dtale 启动 数据加载 功能介绍 主菜单选项 0 切换语言 1 创建列 2 汇总数据 3 缺失率分析 4 绘图 5 高亮功能 6 代码导出 数据导出 列菜单功能 1 冻结 2 隐藏和删除 3 替换和类型转换 4 描述性统计
  • tomcat的多实例和动静分离

    多实例 在一台服务器上有多个tomcat服务 配置成全局变量 方便后面传参 安装tomcat 安装好 jdk后编译安装tomcat cd opt tar zxvf apache tomcat 9 0 16 tar gz mkdir usr
  • android蓝牙键盘光标,罗技K810背光蓝牙键盘快捷键大全

    最近入手了一款罗技K810背光蓝牙键盘 该怎么使用键盘的快捷键实现快捷操作呢 下面我们就来看看罗技K810背光蓝牙键盘快捷键大全 需要的朋友可以参考下 一 PC版键盘上的WIN键相当于MAC iOS系统的command键 文本输入状态下 S
  • WiFi6技术细节简介

    WiFi6技术细节简介 WiFi的历史发展 WiFi历史发展中技术的迭代 WiFi6的新型技术优势 OFDMA 双向MU MMIO 多用户多输入输出 1024QAM 空间频率复用SR BSS Coloring WAP3 实际使用带来的用户体
  • docker: Error response from daemon: could not select device driver ““ with capabilities: [[gpu]].

    需要安装nvidia container toolkit或nvidia container runtime 包含nvidia container toolkit distribution etc os release echo ID VER
  • 使用 React Hooks + mock + antd构建一个完整且漂亮的 todoList

    实现效果 搭建项目 使用 create react app 快速创建一个项目 删除不必要的文件 保留文件如下 目录说明 index js 项目入口文件 index less 样式 mock js 模拟 todo 数据 TodoList js
  • 6基于二阶锥规划的主动配电网最优潮流求解

    matlab代码 6 基于二阶锥规划的主动配电网最优潮流求解 参考文献 主动配电网多源协同运行优化研究 乔珊 摘要 最优潮流研究在配 电网规划运行 中不可或缺 且在大量分布式能源接入 的主动配 电网环境下尤 为重要 传统的启发式算法 在全局
  • statsmodels.regression.linear_model.RegressionResults

    statsmodels regression linear model RegressionResults class statsmodels regression linear model RegressionResults model