repo stringclasses 15
values | pull_number int64 147 18.3k | instance_id stringlengths 14 31 | issue_numbers listlengths 1 3 | base_commit stringlengths 40 40 | patch stringlengths 289 585k | test_patch stringlengths 355 6.82M | problem_statement stringlengths 25 49.4k | hints_text stringlengths 0 58.9k | created_at timestamp[us, tz=UTC]date 2014-08-08 22:09:38 2024-06-28 03:13:12 | version stringclasses 110
values | PASS_TO_PASS listlengths 0 4.82k | FAIL_TO_PASS listlengths 1 1.06k | language stringclasses 4
values | image_urls listlengths 0 4 | website links listlengths 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
webpack/webpack | 18,069 | webpack__webpack-18069 | [
"17989"
] | 2a063f88da046377ee4eac1e57fc2ea9966e55c8 | diff --git a/lib/buildChunkGraph.js b/lib/buildChunkGraph.js
--- a/lib/buildChunkGraph.js
+++ b/lib/buildChunkGraph.js
@@ -44,7 +44,7 @@ const { getEntryRuntime, mergeRuntime } = require("./util/runtime");
* @property {boolean | undefined} minAvailableModulesOwned true, if minAvailableModules is owned and can be modi... | diff --git a/test/__snapshots__/StatsTestCases.basictest.js.snap b/test/__snapshots__/StatsTestCases.basictest.js.snap
--- a/test/__snapshots__/StatsTestCases.basictest.js.snap
+++ b/test/__snapshots__/StatsTestCases.basictest.js.snap
@@ -3355,8 +3355,8 @@ cacheable modules 807 bytes
./first.js 236 bytes [built] [co... | New case for "__webpack_modules__[moduleId] is not a function" error with Module Federation
<!-- Please don't delete this template because we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
# Bug report
<!-- Please ask questions on StackOver... | PR welcome | 2024-02-09T05:07:26Z | 5.90 | [] | [
"test/StatsTestCases.basictest.js",
"test/ConfigTestCases.basictest.js"
] | JavaScript | [] | [] |
webpack/webpack | 18,095 | webpack__webpack-18095 | [
"18091"
] | eaa685e1310e2abc882adc269e9fd6e264bf3f06 | diff --git a/lib/dependencies/HarmonyImportSpecifierDependency.js b/lib/dependencies/HarmonyImportSpecifierDependency.js
--- a/lib/dependencies/HarmonyImportSpecifierDependency.js
+++ b/lib/dependencies/HarmonyImportSpecifierDependency.js
@@ -143,7 +143,8 @@ class HarmonyImportSpecifierDependency extends HarmonyImportD... | diff --git a/test/configCases/mangle/mangle-with-destructuring-assignment/index.js b/test/configCases/mangle/mangle-with-destructuring-assignment/index.js
--- a/test/configCases/mangle/mangle-with-destructuring-assignment/index.js
+++ b/test/configCases/mangle/mangle-with-destructuring-assignment/index.js
@@ -1,4 +1,5 ... | Destructured values from an imported namespace are mangled and returning undefined
<!-- Please don't delete this template because we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
# Bug report
There seems to be a strange issue with name man... | 2024-02-18T09:24:23Z | 5.90 | [] | [
"test/ConfigTestCases.basictest.js"
] | JavaScript | [] | [] | |
webpack/webpack | 18,194 | webpack__webpack-18194 | [
"18111"
] | a48c34b34d2d6c44f9b2b221d7baf278d34ac0be | diff --git a/lib/buildChunkGraph.js b/lib/buildChunkGraph.js
--- a/lib/buildChunkGraph.js
+++ b/lib/buildChunkGraph.js
@@ -1134,12 +1134,6 @@ const visitModules = (
* @param {BlocksWithNestedBlocks} visited visited dependencies blocks
*/
const process = (current, visited) => {
- if (visited.has(current)) {... | diff --git a/test/configCases/chunk-index/recalc-index/a.css b/test/configCases/chunk-index/recalc-index/a.css
new file mode 100644
--- /dev/null
+++ b/test/configCases/chunk-index/recalc-index/a.css
@@ -0,0 +1,3 @@
+.a {
+ color: red;
+}
diff --git a/test/configCases/chunk-index/recalc-index/b.css b/test/configCases/... | @import CSS at-rule not always respected when determining order
<!-- Please don't delete this template because we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
# Bug report
<!-- Please ask questions on StackOverflow or the GitHub Discussio... | Hi there , I would like to work on this issue , I can't access this page though https://github.com/Hypnosphi/webpack-css-order , getting 404
Sorry, it should be public now
/cc @JSerFeng friendly ping
/cc @ahabhgk How do rspack solve this problem?
@Hypnosphi Anyway I recommend to avoid rely on CSS order when you have... | 2024-03-14T07:15:37Z | 5.90 | [] | [
"test/ConfigTestCases.basictest.js"
] | JavaScript | [] | [] |
webpack/webpack | 18,319 | webpack__webpack-18319 | [
"18278"
] | e97af9b5317bc0e7fdbc035b98a577edfe258b83 | diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js
--- a/lib/DefinePlugin.js
+++ b/lib/DefinePlugin.js
@@ -27,6 +27,7 @@ const createHash = require("./util/createHash");
/** @typedef {import("./NormalModule")} NormalModule */
/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */
/** @typedef {import("./j... | diff --git a/test/configCases/mangle/exports-info-can-mangle/index.js b/test/configCases/mangle/exports-info-can-mangle/index.js
--- a/test/configCases/mangle/exports-info-can-mangle/index.js
+++ b/test/configCases/mangle/exports-info-can-mangle/index.js
@@ -8,7 +8,7 @@ it("__webpack_exports_info__.xxx.canMangle should... | mangled exports breaks with destructuring assignment of JSON imports
<!-- Please don't delete this template because we'll close your issue -->
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
# Bug report
<!-- Please ask questions on StackOverflow or the GitHub Disc... | Thank you for the issue, do you want to send a pr?
> Thank you for the issue, do you want to send a pr?
Unfortunately I have no experience working with webpack internals or the details of project goals, so while I might be curious and have a dig to see what's what I couldn't commit to trying to fix this.
/cc @ahabhg... | 2024-04-12T18:45:18Z | 5.91 | [] | [
"test/ConfigTestCases.basictest.js"
] | JavaScript | [] | [] |
jestjs/jest | 10,981 | jestjs__jest-10981 | [
"10577",
"10881"
] | c2f152d9da6298a97a85233b2e754a1cbe7e0a61 | diff --git a/packages/jest-runner/src/index.ts b/packages/jest-runner/src/index.ts
--- a/packages/jest-runner/src/index.ts
+++ b/packages/jest-runner/src/index.ts
@@ -166,7 +166,12 @@ export default class TestRunner {
const worker = new Worker(TEST_WORKER_PATH, {
exposedMethods: ['worker'],
- forkOpt... | diff --git a/e2e/__tests__/__snapshots__/circularInequality.test.ts.snap b/e2e/__tests__/__snapshots__/circularInequality.test.ts.snap
new file mode 100644
--- /dev/null
+++ b/e2e/__tests__/__snapshots__/circularInequality.test.ts.snap
@@ -0,0 +1,53 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`handles cir... | Circular references hang jest when assertions fail on node 14
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
## 🐛 Bug Report
When an assertion fails where either the expected or actual value is circular, and both values are objects, jest encounters an erro... | Is there any workaround?
@Lonli-Lokli Looks like the only workaround for now is `--detectOpenHandles `
However, this causes a massive decrease in performance.
I hope this can be fixed soon. I have migrated several of our projects to jest... and now it causes hiccups all throughout our build system when one test ... | 2020-12-28T13:48:21Z | 27.0 | [] | [
"e2e/__tests__/circularInequality.test.ts"
] | TypeScript | [] | [
"https://repl.it/@Frantiekiaik/jest-playground-1."
] |
jestjs/jest | 11,320 | jestjs__jest-11320 | [
"10741"
] | 1ba867bebc91dd2ae2d0666a521c3892f8bc27ec | diff --git a/packages/jest-reporters/src/GitHubActionsReporter.ts b/packages/jest-reporters/src/GitHubActionsReporter.ts
new file mode 100644
--- /dev/null
+++ b/packages/jest-reporters/src/GitHubActionsReporter.ts
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * T... | diff --git a/packages/jest-reporters/src/__tests__/GitHubActionsReporter.test.js b/packages/jest-reporters/src/__tests__/GitHubActionsReporter.test.js
new file mode 100644
--- /dev/null
+++ b/packages/jest-reporters/src/__tests__/GitHubActionsReporter.test.js
@@ -0,0 +1,118 @@
+/**
+ * Copyright (c) Facebook, Inc. and ... | feat: Added GithubActionsReporter
## Summary
This is based on recommendation and work done in https://github.com/stefanbuck/jest-matcher/pull/2
## Test plan
Testing is not implemented yet, this is just a placeholder pr
| Hi @mariusGundersen!
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.
In order for us to review and merge your code, please sign at <https://code.facebook.com/cla>. **If you are contributing on beha... | 2021-04-20T21:30:29Z | 28.0 | [] | [
"packages/jest-reporters/src/__tests__/GitHubActionsReporter.test.js"
] | TypeScript | [] | [] |
jestjs/jest | 11,358 | jestjs__jest-11358 | [
"11296"
] | 4c3643c60645a3c688920a41fa3cd21b981a3fd9 | diff --git a/packages/jest-watcher/src/constants.ts b/packages/jest-watcher/src/constants.ts
--- a/packages/jest-watcher/src/constants.ts
+++ b/packages/jest-watcher/src/constants.ts
@@ -15,6 +15,7 @@ export const KEYS = {
BACKSPACE: Buffer.from(isWindows ? '08' : '7f', 'hex').toString(),
CONTROL_C: '\u0003',
... | diff --git a/packages/jest-watcher/src/lib/__tests__/prompt.test.ts b/packages/jest-watcher/src/lib/__tests__/prompt.test.ts
--- a/packages/jest-watcher/src/lib/__tests__/prompt.test.ts
+++ b/packages/jest-watcher/src/lib/__tests__/prompt.test.ts
@@ -62,3 +62,20 @@ it('calls handler on cancel prompt', () => {
expe... | <C-u> to clear watch mode pattern prompt
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
## 🚀 Feature Proposal
Currently, pressing Ctrl+u in a watch mode pattern prompt inserts an invisible character that also somewhat breaks searching because the files/t... | This is a Bash thing, but it probably works in most shell emulators (it does in zsh which I use at least).
If we add ctrl+u, we should also do others, like meta/ctrl+b and meta/ctrl+f etc. Feels like a somewhat slippery slope, but perhaps there's some library we can use which parses the input and returns a "command"... | 2021-04-29T15:42:08Z | 27.0 | [] | [
"packages/jest-watcher/src/lib/__tests__/prompt.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 11,364 | jestjs__jest-11364 | [
"11363"
] | 26cb29a42cc9b967f29d70d8c70169993965cf01 | diff --git a/packages/jest-each/src/table/array.ts b/packages/jest-each/src/table/array.ts
--- a/packages/jest-each/src/table/array.ts
+++ b/packages/jest-each/src/table/array.ts
@@ -11,10 +11,11 @@ import type {Global} from '@jest/types';
import {format as pretty} from 'pretty-format';
import type {EachTests} from '... | diff --git a/packages/jest-each/src/__tests__/array.test.ts b/packages/jest-each/src/__tests__/array.test.ts
--- a/packages/jest-each/src/__tests__/array.test.ts
+++ b/packages/jest-each/src/__tests__/array.test.ts
@@ -143,19 +143,22 @@ describe('jest-each', () => {
],
]);
const testFunctio... | Wrong interpolation in `test.each` when the value of array contains multiple `%`
## 🐛 Bug Report
When the value of array contains multiple `%`, wrong interpolation may occur.
## To Reproduce
index.text.js
```javascript
describe("test name should to be `%d %d`", () => {
test.each([["%d %d", 1, 2, 3]])("... | 2021-05-01T05:10:57Z | 27.0 | [] | [
"packages/jest-each/src/__tests__/array.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 11,388 | jestjs__jest-11388 | [
"10394"
] | 705af6854e2f4b32775d65bb06a30c596fad5612 | diff --git a/packages/jest-each/src/table/array.ts b/packages/jest-each/src/table/array.ts
--- a/packages/jest-each/src/table/array.ts
+++ b/packages/jest-each/src/table/array.ts
@@ -10,6 +10,8 @@ import * as util from 'util';
import type {Global} from '@jest/types';
import {format as pretty} from 'pretty-format';
i... | diff --git a/packages/jest-each/src/__tests__/array.test.ts b/packages/jest-each/src/__tests__/array.test.ts
--- a/packages/jest-each/src/__tests__/array.test.ts
+++ b/packages/jest-each/src/__tests__/array.test.ts
@@ -291,6 +291,83 @@ describe('jest-each', () => {
10000,
);
});
+
+ test... | `test.each` should perform string interpolation with object properties
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
## 🚀 Feature Proposal
When giving an array of objects to the `test.each` overload that accepts an array, and not a template strings tabl... | @mattphillips thoughts? Seems reasonable to me
This has been something I've wanted to add for a while but not got around to it and I think we should add parity with the tagged template table with `$` syntax for sure 👍
Hey @mattphillips, I was looking at the code to see how I could contribute this change. Was wond... | 2021-05-08T05:22:58Z | 27.0 | [] | [
"packages/jest-each/src/__tests__/array.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 11,548 | jestjs__jest-11548 | [
"9728"
] | d1882f2e6033186bd310240add41ffe50c2a9259 | diff --git a/packages/jest-core/src/SearchSource.ts b/packages/jest-core/src/SearchSource.ts
--- a/packages/jest-core/src/SearchSource.ts
+++ b/packages/jest-core/src/SearchSource.ts
@@ -288,18 +288,7 @@ export default class SearchSource {
let paths = globalConfig.nonFlagArgs;
if (globalConfig.findRelatedTe... | diff --git a/packages/jest-core/src/__tests__/SearchSource.test.ts b/packages/jest-core/src/__tests__/SearchSource.test.ts
--- a/packages/jest-core/src/__tests__/SearchSource.test.ts
+++ b/packages/jest-core/src/__tests__/SearchSource.test.ts
@@ -406,6 +406,81 @@ describe('SearchSource', () => {
});
});
+ de... | Jest25: --findRelatedTests not working in hidden directory on windows
## 🐛 Bug Report
Since v25, `--findRelatedTests` no longer works on Windows when running in a hidden directory (a directory starting with a `.`).
## To Reproduce
A really small reproduction repo can be found here: https://github.com/nicojs/j... | 2021-06-08T20:25:16Z | 27.0 | [] | [
"packages/jest-core/src/__tests__/SearchSource.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 11,882 | jestjs__jest-11882 | [
"11873"
] | f4188de69812651ed1408eac1baeebed6414dd9c | diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts
--- a/packages/jest-runtime/src/index.ts
+++ b/packages/jest-runtime/src/index.ts
@@ -861,12 +861,14 @@ export default class Runtime {
{conditions: this.cjsConditions},
);
- const mockRegistry = this._isolatedMockRegis... | diff --git a/e2e/__tests__/isolateModules.test.ts b/e2e/__tests__/isolateModules.test.ts
new file mode 100644
--- /dev/null
+++ b/e2e/__tests__/isolateModules.test.ts
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * This source code is licensed under the MIT licens... | [Bug]: issue with jest-runtime between 27.1.0 and 27.1.1 and jest.isolateModules
### Version
27.2.0
### Steps to reproduce
unable to link my repo, but can give an example that currently works. seems how mocks are applied changed between 27.1.0 and 27.1.1. assume related to this PR: https://github.com/facebook/jest/p... | have the same problem with ts-jest, here is a repro repo https://github.com/rburgst/ts-jest-27.1
Please put together a minimal repository showing the error (i.e. without `ts-jest` - I have zero clue what `mocked` is). Ideally without typescript etc either
Actually never mind, just ripping it out wasn't too bad - fix in... | 2021-09-16T12:15:56Z | 27.2 | [] | [
"e2e/__tests__/isolateModules.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 11,902 | jestjs__jest-11902 | [
"11900"
] | 8024306c365cdf8b17b2256c73f1f4c9f23f8f77 | diff --git a/packages/jest-cli/src/cli/args.ts b/packages/jest-cli/src/cli/args.ts
--- a/packages/jest-cli/src/cli/args.ts
+++ b/packages/jest-cli/src/cli/args.ts
@@ -549,9 +549,9 @@ export const options = {
},
testEnvironmentOptions: {
description:
- 'Test environment options that will be passed to the... | diff --git a/packages/jest-config/src/__tests__/setFromArgv.test.ts b/packages/jest-config/src/__tests__/setFromArgv.test.ts
--- a/packages/jest-config/src/__tests__/setFromArgv.test.ts
+++ b/packages/jest-config/src/__tests__/setFromArgv.test.ts
@@ -47,6 +47,7 @@ test('works with string objects', () => {
const argv... | [Bug]: `testEnvironmentOptions` documentation/types are wrong
### Version
27.2.2
### Steps to reproduce
1. define a custom environment, eg.
```ts
class CustomEnvironment extends NodeEnvironment {
constructor(config) {
super(config)
const options = config.testEnviron... | 2021-09-28T08:12:50Z | 27.2 | [] | [
"packages/jest-config/src/__tests__/setFromArgv.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 11,943 | jestjs__jest-11943 | [
"11927"
] | 1547740bbc26400d69f4576bf35645163e942829 | diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts
--- a/packages/jest-runtime/src/index.ts
+++ b/packages/jest-runtime/src/index.ts
@@ -1242,28 +1242,39 @@ export default class Runtime {
);
}
- const {paths} = options;
-
- if (paths) {
- for (const p of paths)... | diff --git a/packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts b/packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts
--- a/packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts
+++ b/packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts
@@ -6,6 +6,9 @@
*
... | [Bug]: `require.resolve` with empty `paths` option does not locate absolute paths
### Version
27.2.4
### Steps to reproduce
See repo README at https://github.com/ekelen/jest-require-resolve-empty-paths-array
OR:
1. Clone reproduction repo linked above and change current directory to repo root.
2. Run `cp tes... | 2021-10-09T01:33:23Z | 27.2 | [] | [
"packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 12,089 | jestjs__jest-12089 | [
"9534"
] | c7397485f11e27d0e03f647283c2c9d9b6ce33ea | diff --git a/packages/jest-mock/src/index.ts b/packages/jest-mock/src/index.ts
--- a/packages/jest-mock/src/index.ts
+++ b/packages/jest-mock/src/index.ts
@@ -32,6 +32,77 @@ export type MockFunctionMetadata<
length?: number;
};
+export type MockableFunction = (...args: Array<any>) => any;
+export type MethodKeysO... | diff --git a/packages/jest-mock/src/__tests__/index.test.ts b/packages/jest-mock/src/__tests__/index.test.ts
--- a/packages/jest-mock/src/__tests__/index.test.ts
+++ b/packages/jest-mock/src/__tests__/index.test.ts
@@ -9,7 +9,7 @@
/* eslint-disable local/ban-types-eventually, local/prefer-rest-params-eventually */
... | Include ts-jest mock util functions in jest core
## 🚀 Feature Proposal
This proposal is for the outcome of the discussion in [ts-jest](https://github.com/kulshekhar/ts-jest/issues/1048) that includes`ts-jest` mock util functions in `jest` core.
## Motivation
Users don't have to install `ts-jest` anymore to ac... | Yeah, I think this is a good idea. There's been some changes to mocks in `@types/jest` as well, would be nice to bring the best features of both into Jest itself (at which point DT could pull the features from us instead).
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a68259ee8883cc9899463fe79a78bb49a9d2f6... | 2021-11-25T17:22:57Z | 27.3 | [] | [
"packages/jest-mock/src/__tests__/index.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 12,213 | jestjs__jest-12213 | [
"12200"
] | 4eabd9d23ebf1c6a4170bca6defd9574d3d2092d | diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts
--- a/packages/jest-runtime/src/index.ts
+++ b/packages/jest-runtime/src/index.ts
@@ -1924,7 +1924,13 @@ export default class Runtime {
};
const fn = this._moduleMocker.fn.bind(this._moduleMocker);
const spyOn = this._mo... | diff --git a/e2e/__tests__/testEnvironment.test.ts b/e2e/__tests__/testEnvironment.test.ts
--- a/e2e/__tests__/testEnvironment.test.ts
+++ b/e2e/__tests__/testEnvironment.test.ts
@@ -5,9 +5,18 @@
* LICENSE file in the root directory of this source tree.
*/
-import {json as runWithJson} from '../runJest';
+import ... | [Bug]: TypeError: Cannot read properties of undefined (reading 'bind')
### Version
27.4.5
### Steps to reproduce
1. clone repo https://github.com/rainbow-industries/jest-bug
2. npm i
3. npm test
4. experience the bug
```bash
npm test
> jest-bug@1.0.0 test
> jest --config=jest.config.js
FAIL ./dem... | I have this exact error with jest 27.4.5. Add `"jest-environment-jsdom": "^27.4.4"` fix it. Reversing jest to 26 also fix it. | 2022-01-04T22:09:03Z | 27.4 | [] | [
"e2e/__tests__/testEnvironment.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 12,322 | jestjs__jest-12322 | [
"8653"
] | d2f03eff4cb2bcff4d49f644a7f235879aed1bc6 | diff --git a/packages/jest-changed-files/src/hg.ts b/packages/jest-changed-files/src/hg.ts
--- a/packages/jest-changed-files/src/hg.ts
+++ b/packages/jest-changed-files/src/hg.ts
@@ -18,7 +18,7 @@ const adapter: SCMAdapter = {
const args = ['status', '-amnu'];
if (options.withAncestor) {
- args.push('-... | diff --git a/e2e/__tests__/jestChangedFiles.test.ts b/e2e/__tests__/jestChangedFiles.test.ts
--- a/e2e/__tests__/jestChangedFiles.test.ts
+++ b/e2e/__tests__/jestChangedFiles.test.ts
@@ -362,14 +362,6 @@ test('handles a bad revision for "changedSince", for git', async () => {
});
testIfHg('gets changed files for hg... | Tests failing for mercurial changed files
## 🐛 Bug Report
Currently, when cloning straight from [the current version `master`](https://github.com/facebook/jest/tree/d051b0da359c5930ab4c3ea69fe5524266622c96) [the test for getting changed files in `hg` is failing](https://github.com/facebook/jest/blob/d051b0da359c593... | I have same problem.
```
$ git rev-parse HEAD
e3f4c65140f08a2ec81e5a8260704c1d201e33c1
```
```
System:
OS: macOS 10.15.1
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6... | 2022-02-07T18:56:08Z | 28.0 | [] | [
"e2e/__tests__/jestChangedFiles.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 12,531 | jestjs__jest-12531 | [
"12106"
] | ab7480498f2b013fa4cd94b80da9311f59a5f008 | diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts
--- a/packages/jest-runtime/src/index.ts
+++ b/packages/jest-runtime/src/index.ts
@@ -1141,6 +1141,8 @@ export default class Runtime {
this._esmoduleRegistry.clear();
this._cjsNamedExports.clear();
this._moduleMockRegist... | diff --git a/e2e/__tests__/clearFSAndTransformCache.test.ts b/e2e/__tests__/clearFSAndTransformCache.test.ts
new file mode 100644
--- /dev/null
+++ b/e2e/__tests__/clearFSAndTransformCache.test.ts
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * This source code is... | [Bug]: failed to clear require cache
### Version
27.4.2
### Steps to reproduce
1. clone my repo git@github.com:xkn1ght/jest-require.git
2. `pnpm install`
3. `pnpx jest ./index.spec.js`
### Expected behavior
Expect to see require a totally different module, but I get the same value a = 1.
However, the refenenc... | I have the same problem.
https://stackoverflow.com/questions/71001519/unable-to-invalidate-the-require-cache-jest-cache
Currently, jest does not support this feature, but i think it could be supported. | 2022-03-02T03:35:23Z | 28.0 | [] | [
"e2e/__tests__/clearFSAndTransformCache.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 12,674 | jestjs__jest-12674 | [
"12672"
] | 1cce9a7dc194103576fad6c2086052efbea5ae77 | diff --git a/packages/jest-mock/src/index.ts b/packages/jest-mock/src/index.ts
--- a/packages/jest-mock/src/index.ts
+++ b/packages/jest-mock/src/index.ts
@@ -971,8 +971,12 @@ export class ModuleMocker {
metadata.value = component;
return metadata;
} else if (type === 'function') {
- // @ts-expe... | diff --git a/packages/jest-mock/src/__tests__/index.test.ts b/packages/jest-mock/src/__tests__/index.test.ts
--- a/packages/jest-mock/src/__tests__/index.test.ts
+++ b/packages/jest-mock/src/__tests__/index.test.ts
@@ -30,6 +30,17 @@ describe('moduleMocker', () => {
expect(metadata.name).toBe('x');
});
+ ... | [Bug]:
### Version
27.5.1
### Steps to reproduce
1. Clone repo at https://github.com/kpeters-cbsi/jest-fails-to-mock-selenium-webdriver
2. `yarn install`
3. `yarn test`
### Expected behavior
I expect the test to complete successfully.
### Actual behavior
```
FAIL test/index.ts
● Test suite failed to run... | This is due to https://github.com/SeleniumHQ/selenium/blob/8b53734fd2bc97f7d084dc8326bf4b6c47b7052e/javascript/node/selenium-webdriver/lib/by.js#L205-L207 messing with our logic for gettting the name of a function here: https://github.com/facebook/jest/blob/1cce9a7dc194103576fad6c2086052efbea5ae77/packages/jest-mock/sr... | 2022-04-15T09:09:48Z | 28.0 | [] | [
"packages/jest-mock/src/__tests__/index.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 12,763 | jestjs__jest-12763 | [
"12752"
] | c8c32d3704469557ecfc3d4a9e81002f11e2075d | diff --git a/packages/expect-utils/package.json b/packages/expect-utils/package.json
--- a/packages/expect-utils/package.json
+++ b/packages/expect-utils/package.json
@@ -20,6 +20,7 @@
"jest-get-type": "^28.0.2"
},
"devDependencies": {
+ "immutable": "^4.0.0",
"jest-matcher-utils": "^28.0.2"
},
... | diff --git a/packages/expect-utils/src/__tests__/utils.test.ts b/packages/expect-utils/src/__tests__/utils.test.ts
--- a/packages/expect-utils/src/__tests__/utils.test.ts
+++ b/packages/expect-utils/src/__tests__/utils.test.ts
@@ -6,6 +6,7 @@
*
*/
+import {List} from 'immutable';
import {stringify} from 'jest-ma... | [Bug]: Jest 28 fails on Immutable.List().filter toEqual comparison
### Version
28.0.1
### Steps to reproduce
1. Install latest `immutable` - (e.g. `yarn add immutable@^4.0.0`).
2. Create the following test file:
```js
const { List } = require("immutable");
const numbers = List([1, 2]);
... | Bisecting, this was introduced in #8359.
@romellem would you be able to provide a PR fixing this? 🙂
I can definitely take a look. Thanks for tracking down the offending commit, I'll do some digging and see what [filter][1] is doing with `entries` compared a regular `List`.
Any ideas that are coming to mind?
... | 2022-04-28T04:40:27Z | 28.0 | [] | [
"packages/expect-utils/src/__tests__/utils.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 12,899 | jestjs__jest-12899 | [
"12860"
] | 6277505d953c9d8fef938d6a113bba86c38b72f1 | diff --git a/packages/expect-utils/src/jasmineUtils.ts b/packages/expect-utils/src/jasmineUtils.ts
--- a/packages/expect-utils/src/jasmineUtils.ts
+++ b/packages/expect-utils/src/jasmineUtils.ts
@@ -266,3 +266,11 @@ export function isImmutableList(maybeList: any) {
maybeList[IS_LIST_SENTINEL]
);
}
+
+export fu... | diff --git a/packages/expect-utils/src/__tests__/utils.test.ts b/packages/expect-utils/src/__tests__/utils.test.ts
--- a/packages/expect-utils/src/__tests__/utils.test.ts
+++ b/packages/expect-utils/src/__tests__/utils.test.ts
@@ -6,7 +6,7 @@
*
*/
-import {List} from 'immutable';
+import {List, OrderedMap} from '... | [Bug]: Another Immutable equals comparison failure
### Version
28.1.0
### Steps to reproduce
```
import Immutable from 'immutable';
it('works with immutable objects', () => {
const a = Immutable.OrderedMap().set('saving', true);
const b = Immutable.OrderedMap().merge({ saving: true });
console.log(a);
... | PR welcome 😀 | 2022-06-01T22:06:54Z | 28.1 | [] | [
"packages/expect-utils/src/__tests__/utils.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 12,977 | jestjs__jest-12977 | [
"12976"
] | 93e115035057c4fdbf5466211e102f60bb08a6e6 | diff --git a/packages/expect-utils/src/jasmineUtils.ts b/packages/expect-utils/src/jasmineUtils.ts
--- a/packages/expect-utils/src/jasmineUtils.ts
+++ b/packages/expect-utils/src/jasmineUtils.ts
@@ -274,3 +274,12 @@ export function isImmutableOrderedKeyed(maybeKeyed: any) {
maybeKeyed[IS_ORDERED_SENTINEL]
);
}... | diff --git a/packages/expect-utils/src/__tests__/utils.test.ts b/packages/expect-utils/src/__tests__/utils.test.ts
--- a/packages/expect-utils/src/__tests__/utils.test.ts
+++ b/packages/expect-utils/src/__tests__/utils.test.ts
@@ -6,7 +6,7 @@
*
*/
-import {List, OrderedMap} from 'immutable';
+import {List, Ordere... | [Bug]: Immutable.OrderedSet equality comparison failure
### Version
28.1.2
### Steps to reproduce
```
import { OrderedSet, List } from 'immutable';
it('works with immutable objects', () => {
const a = OrderedSet().add('newValue');
const b = List(['newValue']).toOrderedSet();
expect(Immutable.is(a, b)).t... | 2022-06-29T22:32:32Z | 28.1 | [] | [
"packages/expect-utils/src/__tests__/utils.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 13,055 | jestjs__jest-13055 | [
"13051"
] | 837af9eab05d6c8cbaa03a2528bce05c050280c5 | diff --git a/packages/expect-utils/src/jasmineUtils.ts b/packages/expect-utils/src/jasmineUtils.ts
--- a/packages/expect-utils/src/jasmineUtils.ts
+++ b/packages/expect-utils/src/jasmineUtils.ts
@@ -243,6 +243,7 @@ const IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
c... | diff --git a/packages/expect-utils/src/__tests__/utils.test.ts b/packages/expect-utils/src/__tests__/utils.test.ts
--- a/packages/expect-utils/src/__tests__/utils.test.ts
+++ b/packages/expect-utils/src/__tests__/utils.test.ts
@@ -6,7 +6,7 @@
*
*/
-import {List, OrderedMap, OrderedSet} from 'immutable';
+import {... | [Bug]: Immutable.Record equality comparison failure
### Version
28.1.3
### Steps to reproduce
1. Install latest Immutable.js(v4.1.0) and jest.
- e.g. `yarn install immutable jest`
2. Create the following test file and run the test.
```javascript
const Immutable = require("immutable");
it("passed in j... | 2022-07-22T07:16:21Z | 29.0 | [] | [
"packages/expect-utils/src/__tests__/utils.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 13,866 | jestjs__jest-13866 | [
"13808"
] | dc0ac7580f9ab1a7e8aa108b206f1eaa2f8e2b15 | diff --git a/packages/jest-mock/src/index.ts b/packages/jest-mock/src/index.ts
--- a/packages/jest-mock/src/index.ts
+++ b/packages/jest-mock/src/index.ts
@@ -258,6 +258,8 @@ type MockFunctionConfig = {
specificMockImpls: Array<Function>;
};
+type SpyState = {reset?: () => void; restore: () => void};
+
const MOC... | diff --git a/packages/jest-mock/src/__tests__/index.test.ts b/packages/jest-mock/src/__tests__/index.test.ts
--- a/packages/jest-mock/src/__tests__/index.test.ts
+++ b/packages/jest-mock/src/__tests__/index.test.ts
@@ -1247,30 +1247,6 @@ describe('moduleMocker', () => {
expect(fn.getMockName()).toBe('jest.fn()');
... | [Bug]: resetAllMocks restoring mocks instead of resetting them
### Version
29.4.0
### Steps to reproduce
Simple test to reproduce:
```
test('it should reset properly', () => {
const obj = {
foo: () => 42,
};
const fooSpy = jest.spyOn(obj, 'foo');
console.log(obj.foo());
expect(obj.foo).to... | Are you working on this?
No, I don't know enough about Jest internals to suggest a fix.
~Besides, I'd expect that a certain multi-billion-dollar corporation would be maintaining this. Don't get me wrong, I'm all for contributing to open source but if the project is backed by a huge corporation, I think they can spa... | 2023-02-07T09:15:40Z | 29.4 | [] | [
"packages/jest-mock/src/__tests__/index.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 13,888 | jestjs__jest-13888 | [
"13887"
] | 94b73a2dd8bf8f6225769f2fe4a9322ac85483d8 | diff --git a/packages/jest-mock/src/index.ts b/packages/jest-mock/src/index.ts
--- a/packages/jest-mock/src/index.ts
+++ b/packages/jest-mock/src/index.ts
@@ -842,16 +842,20 @@ export class ModuleMocker {
// Remember previous mock implementation, then set new one
const mockConfig = this._ensureMockCon... | diff --git a/packages/jest-mock/src/__tests__/index.test.ts b/packages/jest-mock/src/__tests__/index.test.ts
--- a/packages/jest-mock/src/__tests__/index.test.ts
+++ b/packages/jest-mock/src/__tests__/index.test.ts
@@ -1143,6 +1143,38 @@ describe('moduleMocker', () => {
expect.assertions(4);
});
+
+ it... | [Bug]: mockImplementationOnce bleeds into withImplementation
### Version
29.4.2
### Steps to reproduce
1. Open [online repo](https://stackblitz.com/edit/node-7pqpfa?file=mock.test.js)
2. Run `npm install`
3. Run `npm test`
### Expected behavior
```js
const mock = jest
.fn(() => 'outside callback')
.m... | 2023-02-10T08:09:01Z | 29.4 | [] | [
"packages/jest-mock/src/__tests__/index.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 14,007 | jestjs__jest-14007 | [
"10167"
] | 94c06ef0aa9b327f3c400610b861e7308b29ee0d | diff --git a/packages/jest-matcher-utils/src/deepCyclicCopyReplaceable.ts b/packages/jest-matcher-utils/src/deepCyclicCopyReplaceable.ts
--- a/packages/jest-matcher-utils/src/deepCyclicCopyReplaceable.ts
+++ b/packages/jest-matcher-utils/src/deepCyclicCopyReplaceable.ts
@@ -57,9 +57,18 @@ export default function deepCy... | diff --git a/packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceable.test.ts b/packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceable.test.ts
--- a/packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceable.test.ts
+++ b/packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceab... | toEqual throws a TypeError when using getter to private field of class
## 🐛 Bug Report
Jest throws a `TypeError` when using `toEqual` or `toMatchObject` in a class with private fields (those starting by `#`) and a getter that exposes the value. I guess other similar matchers like `toStrictEqual` also fails but didn... | @InExtremaRes did you ever find a fix or workaround for this? I've too run into this where I am trying to check the equality of a class's getters with a jest expect.
@defunctzombie No, not really. I started creating a plain object with the properties I want to compare, but that's far from ideal. I made a little utility... | 2023-03-14T16:06:02Z | 29.5 | [] | [
"packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceable.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 14,048 | jestjs__jest-14048 | [
"13980"
] | 257f250a977264656eca386629c7ce3b6481f21b | diff --git a/packages/jest-transform/src/shouldInstrument.ts b/packages/jest-transform/src/shouldInstrument.ts
--- a/packages/jest-transform/src/shouldInstrument.ts
+++ b/packages/jest-transform/src/shouldInstrument.ts
@@ -114,5 +114,9 @@ export default function shouldInstrument(
}
}
+ if (filename.endsWith(... | diff --git a/packages/jest-transform/src/__tests__/shouldInstrument.test.ts b/packages/jest-transform/src/__tests__/shouldInstrument.test.ts
--- a/packages/jest-transform/src/__tests__/shouldInstrument.test.ts
+++ b/packages/jest-transform/src/__tests__/shouldInstrument.test.ts
@@ -119,6 +119,12 @@ describe('shouldInst... | [Bug]: import JSON fails when coverage is enabled
### Version
29.4.3
### Steps to reproduce
data.json
```json
{"hello":"world"}
```
jest.config.json
```json
{
"testEnvironment": "node",
"transform": {}
}
```
package.json
```json
{
"name": "jest_json_coverage",
"scripts": {
"test": "no... | This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. | 2023-04-03T10:27:41Z | 29.5 | [] | [
"packages/jest-transform/src/__tests__/shouldInstrument.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 14,054 | jestjs__jest-14054 | [
"8293"
] | 257f250a977264656eca386629c7ce3b6481f21b | diff --git a/packages/jest-config/src/readConfigFileAndSetRootDir.ts b/packages/jest-config/src/readConfigFileAndSetRootDir.ts
--- a/packages/jest-config/src/readConfigFileAndSetRootDir.ts
+++ b/packages/jest-config/src/readConfigFileAndSetRootDir.ts
@@ -64,14 +64,17 @@ export default async function readConfigFileAndSe... | diff --git a/packages/jest-config/src/__tests__/readConfigFileAndSetRootDir.test.ts b/packages/jest-config/src/__tests__/readConfigFileAndSetRootDir.test.ts
new file mode 100644
--- /dev/null
+++ b/packages/jest-config/src/__tests__/readConfigFileAndSetRootDir.test.ts
@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) Meta Platf... | Require of a shared config file returns unwanted rootDir field
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
## To Reproduce
Create the following monorepo structure with configs that reference each other:
_/jest.config.js_
```js
module.exports = {
... | Another issue that has the same root cause: export a frozen object from the `jest.config.js`:
```js
module.exports = Object.freeze( {
...
} );
```
Then Jest will fail to read it:
```
TypeError: Cannot assign to read only property 'rootDir' of object '#<Object>'
at _default (.../node_modules/jest-config/b... | 2023-04-05T05:21:34Z | 29.5 | [] | [
"packages/jest-config/src/__tests__/readConfigFileAndSetRootDir.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 14,087 | jestjs__jest-14087 | [
"14077",
"14082"
] | 77c2c6e00e0da58e242862237e541af4dde90d3c | diff --git a/packages/jest-mock/src/index.ts b/packages/jest-mock/src/index.ts
--- a/packages/jest-mock/src/index.ts
+++ b/packages/jest-mock/src/index.ts
@@ -1156,19 +1156,16 @@ export class ModuleMocker {
methodKey: keyof T,
accessType?: 'get' | 'set',
): MockInstance {
- if (typeof object !== 'object... | diff --git a/packages/jest-mock/src/__tests__/index.test.ts b/packages/jest-mock/src/__tests__/index.test.ts
--- a/packages/jest-mock/src/__tests__/index.test.ts
+++ b/packages/jest-mock/src/__tests__/index.test.ts
@@ -1304,20 +1304,181 @@ describe('moduleMocker', () => {
expect(spy).not.toHaveBeenCalled();
... | [Bug]: jest-mock/spyOn property name check is "truthy" instead of "defined" or "existent"
### Version
29.5
### Steps to reproduce
Minimal Typescript example with real-world use case
```
enum WhyNot {
A,
B,
C
}
const DynamicDispatchObject:Record<WhyNot,CallableFunction>={
[WhyNot.A]:()=>{}... | Just open a PR to fix this. I guess the check should be:
```ts
if (methodKey == null) {
throw new Error('No property name supplied');
}
```
> Just open a PR to fix this. I guess the check should be:
>
> ```ts
> if (methodKey == null) {
> throw new Error('No property name supplied');
> }
> ```
that ... | 2023-04-19T13:51:20Z | 29.5 | [] | [
"packages/jest-mock/src/__tests__/index.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 14,465 | jestjs__jest-14465 | [
"14464"
] | f2c78d04ff35688571a66d66c8a2c7c17a095444 | diff --git a/packages/jest-snapshot/src/InlineSnapshots.ts b/packages/jest-snapshot/src/InlineSnapshots.ts
--- a/packages/jest-snapshot/src/InlineSnapshots.ts
+++ b/packages/jest-snapshot/src/InlineSnapshots.ts
@@ -274,7 +274,7 @@ const traverseAst = (
snapshotMatcherNames.push(callee.property.name);
const ... | diff --git a/packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts b/packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts
--- a/packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts
+++ b/packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts
@@ -738,3 +738,23 @@ test('saveInlineSnapshots() ... | [Bug]: Inline snapshots are appending a new template literal instead of replacing existing string
### Version
29.6.4
### Steps to reproduce
1. Clone https://github.com/bawjensen/jest-inline-snapshot-repro
2. `pnpm install`
3. `pnpm jest inline-snapshot.test.js --updateSnapshot` (though I had to run `pnpm jes... | From what I can tell this is the same as #10164, which was closed due to inactivity but seemed like a valid issue | 2023-08-31T22:36:07Z | 29.6 | [] | [
"packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 14,688 | jestjs__jest-14688 | [
"13936"
] | 5b97c9dda5c970892a8b96bec4313cb1f60dee06 | diff --git a/packages/expect-utils/src/utils.ts b/packages/expect-utils/src/utils.ts
--- a/packages/expect-utils/src/utils.ts
+++ b/packages/expect-utils/src/utils.ts
@@ -307,8 +307,8 @@ export const iterableEquality = (
!isImmutableOrderedSet(a) &&
!isImmutableRecord(a)
) {
- const aEntries = Object.en... | diff --git a/packages/expect-utils/src/__tests__/utils.test.ts b/packages/expect-utils/src/__tests__/utils.test.ts
--- a/packages/expect-utils/src/__tests__/utils.test.ts
+++ b/packages/expect-utils/src/__tests__/utils.test.ts
@@ -591,6 +591,36 @@ describe('iterableEquality', () => {
const b = new TestRecord().set... | [Bug]: toEqual() doesn't work for iterable objects if objects have symbol property
### Version
latest
### Steps to reproduce
```javascript
const Key = Symbol()
class Test {
constructor(value) {
this[Key] = value
}
[Symbol.iterator]() {
return [][Symbol.iterator]()
}
}
expect(new Test(1)).t... | This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automat... | 2023-11-09T16:38:44Z | 30.0 | [] | [
"packages/expect-utils/src/__tests__/utils.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 14,894 | jestjs__jest-14894 | [
"14734"
] | 8bbe2a34a8a7979d71ece3fadc6006df3e607d9f | diff --git a/packages/expect-utils/src/utils.ts b/packages/expect-utils/src/utils.ts
--- a/packages/expect-utils/src/utils.ts
+++ b/packages/expect-utils/src/utils.ts
@@ -355,12 +355,14 @@ export const subsetEquality = (
return undefined;
}
- return getObjectKeys(subset).every(key => {
+ if ... | diff --git a/e2e/__tests__/circularRefInBuiltInObj.test.ts b/e2e/__tests__/circularRefInBuiltInObj.test.ts
new file mode 100644
--- /dev/null
+++ b/e2e/__tests__/circularRefInBuiltInObj.test.ts
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MI... | [Bug]: Stackoverflow in toMatchObject when matching w/ recursive object
### Version
29.7.0
### Steps to reproduce
Using `expect` 29.7.0
Here is a contrived example (real usage [here](https://github.com/GoogleChrome/lighthouse/blob/b75a9d98875c95d156811b3b85e796aa4024a82c/core/test/network-records-to-devtool... | This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
We should start by adding a warning to the docs I guess, but it would be nice to support this
As far as I've tested, the issue doesn't happen if the circular reference is not in an arr... | 2024-02-11T17:06:55Z | 30.0 | [] | [
"e2e/__tests__/circularRefInBuiltInObj.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 14,980 | jestjs__jest-14980 | [
"14943",
"14944"
] | d4d1f2b8004b1eb4bf0cf862698dd1142e13278f | diff --git a/packages/jest-core/src/runJest.ts b/packages/jest-core/src/runJest.ts
--- a/packages/jest-core/src/runJest.ts
+++ b/packages/jest-core/src/runJest.ts
@@ -214,13 +214,21 @@ export default async function runJest({
if (globalConfig.listTests) {
const testsPaths = [...new Set(allTests.map(test => tes... | diff --git a/e2e/__tests__/__snapshots__/listTests.test.ts.snap b/e2e/__tests__/__snapshots__/listTests.test.ts.snap
--- a/e2e/__tests__/__snapshots__/listTests.test.ts.snap
+++ b/e2e/__tests__/__snapshots__/listTests.test.ts.snap
@@ -1,5 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`--listTests flag... | [Feature]: outputFile support for listTests option
### 🚀 Feature Proposal
Right now, the --listTests option will just write the list of tests to the console. My proposal is to use the --outputFile option along with the --listTests option to write the output to the file.
### Motivation
We wanted to use the list of t... | Raised Pull Request here -> https://github.com/jestjs/jest/pull/14944
<a href="https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/35323119/15062869/14944/#/?version=2"><img src="https://s3.amazonaws.com/cla-project-logo-prod/cla-not-signed.svg" alt="CLA Not Signed" align="left" height="28" ... | 2024-03-21T03:44:41Z | 30.0 | [] | [
"e2e/__tests__/listTests.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 15,101 | jestjs__jest-15101 | [
"15025",
"15091"
] | fa24a3bdd6682978d76799265016fb9d5bff135e | diff --git a/packages/expect/src/asymmetricMatchers.ts b/packages/expect/src/asymmetricMatchers.ts
--- a/packages/expect/src/asymmetricMatchers.ts
+++ b/packages/expect/src/asymmetricMatchers.ts
@@ -136,6 +136,10 @@ class Any extends AsymmetricMatcher<any> {
return typeof other == 'object';
}
+ if (thi... | diff --git a/packages/expect/src/__tests__/asymmetricMatchers.test.ts b/packages/expect/src/__tests__/asymmetricMatchers.test.ts
--- a/packages/expect/src/__tests__/asymmetricMatchers.test.ts
+++ b/packages/expect/src/__tests__/asymmetricMatchers.test.ts
@@ -6,6 +6,7 @@
*
*/
+import {runInNewContext} from 'node:v... | [Bug]: Native fetch Arrays Incorrectly Matched
### Version
v30.0.0-alpha.3 and v29.7.0
### Steps to reproduce
1. Create a test file with this code
```js
it('matches fetch parsed Array', async () => {
expect(await (await fetch('https://avatar.roblox.com/v1/users/1/outfits')).json()).toMatchObject({
da... | This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Still an issue.
This is https://github.com/jestjs/jest/issues/2549
You can probably use `Array.from` in your test code, that might help. Not sure there's much else we can do 🤔
W... | 2024-05-31T22:53:55Z | 30.0 | [] | [
"packages/expect/src/__tests__/asymmetricMatchers.test.ts"
] | TypeScript | [] | [] |
jestjs/jest | 15,138 | jestjs__jest-15138 | [
"15137"
] | c54bccd657fb4cf060898717c09f633b4da3eec4 | diff --git a/packages/pretty-format/src/plugins/DOMElement.ts b/packages/pretty-format/src/plugins/DOMElement.ts
--- a/packages/pretty-format/src/plugins/DOMElement.ts
+++ b/packages/pretty-format/src/plugins/DOMElement.ts
@@ -30,16 +30,21 @@ const testHasAttribute = (val: any) => {
}
};
+const isCustomElement = ... | diff --git a/packages/pretty-format/src/__tests__/DOMElement.test.ts b/packages/pretty-format/src/__tests__/DOMElement.test.ts
--- a/packages/pretty-format/src/__tests__/DOMElement.test.ts
+++ b/packages/pretty-format/src/__tests__/DOMElement.test.ts
@@ -357,12 +357,14 @@ Testing.`;
customElements.define('custom-p... | [Bug]: Jest fails to serialize custom elements with anonymous constructors
### Version
latest
### Steps to reproduce
Reproduction here:
https://github.com/testing-library/dom-testing-library/issues/1191#issue-1465496571
```js
class MyElement extends HTMLElement {}
window.customElements.define("my-element", c... | 2024-06-19T20:07:30Z | 30.0 | [] | [
"packages/pretty-format/src/__tests__/DOMElement.test.ts"
] | TypeScript | [] | [] | |
jestjs/jest | 8,359 | jestjs__jest-8359 | [
"8280"
] | 103fb154910e8b9df1c4e88896bc90f07c3ec341 | diff --git a/packages/expect-utils/src/utils.ts b/packages/expect-utils/src/utils.ts
--- a/packages/expect-utils/src/utils.ts
+++ b/packages/expect-utils/src/utils.ts
@@ -254,6 +254,12 @@ export const iterableEquality = (
return false;
}
+ const aEntries = Object.entries(a);
+ const bEntries = Object.entrie... | diff --git a/packages/expect-utils/src/__tests__/utils.test.ts b/packages/expect-utils/src/__tests__/utils.test.ts
--- a/packages/expect-utils/src/__tests__/utils.test.ts
+++ b/packages/expect-utils/src/__tests__/utils.test.ts
@@ -422,6 +422,49 @@ describe('iterableEquality', () => {
).toBe(false);
});
+ tes... | isEqual() on iterable ignores other properties
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
## 🐛 Bug Report
Testing iterable objects with isEqual() ignores other properties on the iterable
## To Reproduce
```js
let next = () => ({ value: undefin... | This reproduces for me, and it's a bug with our custom `iterableEquality`. With `Array`s, it works.
I'll send a PR | 2019-04-22T09:41:40Z | 28.0 | [] | [
"packages/expect-utils/src/__tests__/utils.test.ts"
] | TypeScript | [] | [] |
statsmodels/statsmodels | 6,643 | statsmodels__statsmodels-6643 | [
"6642"
] | 4e77b4b07545f848fe001c24197cf49214a8c2d1 | diff --git a/statsmodels/stats/diagnostic.py b/statsmodels/stats/diagnostic.py
--- a/statsmodels/stats/diagnostic.py
+++ b/statsmodels/stats/diagnostic.py
@@ -802,7 +802,10 @@ def acorr_breusch_godfrey(res, nlags=None, store=False):
nobs = xdall.shape[0]
xdall = np.c_[np.ones((nobs, 1)), xdall]
xshort = ... | diff --git a/statsmodels/stats/tests/test_diagnostic.py b/statsmodels/stats/tests/test_diagnostic.py
--- a/statsmodels/stats/tests/test_diagnostic.py
+++ b/statsmodels/stats/tests/test_diagnostic.py
@@ -28,6 +28,7 @@
from statsmodels.tools.tools import Bunch
from statsmodels.tools.tools import add_constant
from stat... | BUG: acorr_breusch_godfrey error in regressions without const or exogs
In ARMA models without constant (or ARMAX without constant and without exogs) the acorr_breusch_godfrey method don't check if res.model.exog is None and try to use exogs returning a ValueError.
#### Code Sample, a copy-pastable example if possibl... | 2020-04-14T03:10:47Z | 0.12 | [
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticG::test_normality",
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticG::test_compare_error[compare_j]",
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticG::test_cusum_ols",
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosti... | [
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticG::test_acorr_breusch_godfrey_exogs",
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticGPandas::test_acorr_breusch_godfrey_exogs"
] | Python | [] | [] | |
statsmodels/statsmodels | 6,909 | statsmodels__statsmodels-6909 | [
"6907"
] | b911f6be01f39b8d3da3398c00073c1ef18edf80 | diff --git a/statsmodels/tsa/statespace/varmax.py b/statsmodels/tsa/statespace/varmax.py
--- a/statsmodels/tsa/statespace/varmax.py
+++ b/statsmodels/tsa/statespace/varmax.py
@@ -936,14 +936,11 @@ def _set_final_predicted_state(self, exog, out_of_sample):
Notes
-----
- We need special handlin... | diff --git a/statsmodels/tsa/statespace/tests/test_varmax.py b/statsmodels/tsa/statespace/tests/test_varmax.py
--- a/statsmodels/tsa/statespace/tests/test_varmax.py
+++ b/statsmodels/tsa/statespace/tests/test_varmax.py
@@ -1051,7 +1051,57 @@ def test_append_results():
res1.forecast(10, exog=np.ones... | VARMAXResults.extend() causes ValueError: array must not contain infs or NaNs
#### Describe the bug
Extending a VARMAX model with new observations throws a ValueError even though the analogous univariate extend with same syntax works for SARIMAX.
#### Code Sample, a copy-pastable example if possible
```pytho... | I also posted this as a stackoverflow question:
https://stackoverflow.com/questions/63021311/varmax-results-extend-causes-valueerror-array-must-not-contain-infs-or-nans
Thanks for posting this issue! It is a bug in handling `extend` with a trend. It's an easy issue to fix, but until we get a new release out there is... | 2020-07-22T03:49:02Z | 0.12 | [
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVAR_exog::test_bse_oim",
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVAR_exog::test_params",
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVAR_exog::test_bse_approx",
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVAR_exog::test_dy... | [
"statsmodels/tsa/statespace/tests/test_varmax.py::test_extend_results[True-c]",
"statsmodels/tsa/statespace/tests/test_varmax.py::test_extend_results[True-ct]"
] | Python | [] | [] |
statsmodels/statsmodels | 6,969 | statsmodels__statsmodels-6969 | [
"6383"
] | 1c82e3ab6f35920c5d76f304931ef0cfe40ffeaf | diff --git a/statsmodels/robust/scale.py b/statsmodels/robust/scale.py
--- a/statsmodels/robust/scale.py
+++ b/statsmodels/robust/scale.py
@@ -49,6 +49,44 @@ def mad(a, c=Gaussian.ppf(3/4.), axis=0, center=np.median):
return np.median((np.abs(a-center)) / c, axis=axis)
+def iqr(a, c=Gaussian.ppf(3/4) - Gaussia... | diff --git a/statsmodels/robust/tests/test_scale.py b/statsmodels/robust/tests/test_scale.py
--- a/statsmodels/robust/tests/test_scale.py
+++ b/statsmodels/robust/tests/test_scale.py
@@ -31,6 +31,9 @@ def test_median(self):
def test_mad(self):
assert_almost_equal(scale.mad(self.chem), 0.52632, DECIMAL)
... | ENH/BUG iqr is not scaled for normal distribution
https://www.statsmodels.org/stable/_modules/statsmodels/tools/eval_measures.html#iqr
computes raw IQR, I thought we have scaling to normal distribution as in `robust.scale.mad`
(iqr is now also available in scipy)
code search finds adjustment or usage like `iqr =... | I think we can add a by default normalized iqr based on numpy percentiles in `robust.scale` (possibly with option for other distributions. | 2020-08-14T17:42:04Z | 0.12 | [
"statsmodels/robust/tests/test_scale.py::TestHuberAxes::test_axis2",
"statsmodels/robust/tests/test_scale.py::TestHuberAxes::test_axis1",
"statsmodels/robust/tests/test_scale.py::TestHuberAxes::test_axisneg1",
"statsmodels/robust/tests/test_scale.py::TestHuberAxes::test_default",
"statsmodels/robust/tests/t... | [
"statsmodels/robust/tests/test_scale.py::TestIqrAxes::test_axisneg1",
"statsmodels/robust/tests/test_scale.py::TestIqrAxes::test_axis1",
"statsmodels/robust/tests/test_scale.py::TestIqrAxes::test_axis2",
"statsmodels/robust/tests/test_scale.py::TestIqrAxes::test_axis0",
"statsmodels/robust/tests/test_scale.... | Python | [] | [] |
statsmodels/statsmodels | 7,000 | statsmodels__statsmodels-7000 | [
"6999"
] | 1e6b7c6ef6ad534adbd59a5efccaf8646d221146 | diff --git a/statsmodels/robust/scale.py b/statsmodels/robust/scale.py
--- a/statsmodels/robust/scale.py
+++ b/statsmodels/robust/scale.py
@@ -45,10 +45,12 @@ def mad(a, c=Gaussian.ppf(3/4.), axis=0, center=np.median):
"""
a = array_like(a, 'a', ndim=None)
c = float_like(c, 'c')
- if callable(center) ... | diff --git a/statsmodels/robust/tests/test_scale.py b/statsmodels/robust/tests/test_scale.py
--- a/statsmodels/robust/tests/test_scale.py
+++ b/statsmodels/robust/tests/test_scale.py
@@ -5,6 +5,7 @@
import numpy as np
from numpy.random import standard_normal
from numpy.testing import assert_almost_equal, assert_equa... | BUG: issue with how mad handles non-callable center arguments
#### Describe the bug
The center argument in the mad function is supposed to set the location estimate around which the mad will be computed. If center is not callable, the the function sets center to 0, and ignores the input, but the documentation states... | The code is a bug and should use the user provided center if it is not callable.
It should be possible to quickfix this, so it can still go into 0.12 before Friday
@bashtage | 2020-08-26T21:28:17Z | 0.12 | [
"statsmodels/robust/tests/test_scale.py::TestMad::test_mad",
"statsmodels/robust/tests/test_scale.py::TestMad::test_mad_empty",
"statsmodels/robust/tests/test_scale.py::TestQn::test_qn_empty",
"statsmodels/robust/tests/test_scale.py::TestQn::test_qn_naive",
"statsmodels/robust/tests/test_scale.py::TestQn::t... | [
"statsmodels/robust/tests/test_scale.py::TestMad::test_mad_center"
] | Python | [] | [] |
statsmodels/statsmodels | 7,002 | statsmodels__statsmodels-7002 | [
"6988"
] | 1e6b7c6ef6ad534adbd59a5efccaf8646d221146 | diff --git a/statsmodels/nonparametric/kde.py b/statsmodels/nonparametric/kde.py
--- a/statsmodels/nonparametric/kde.py
+++ b/statsmodels/nonparametric/kde.py
@@ -13,30 +13,37 @@
"""
import numpy as np
from scipy import integrate, stats
+
from statsmodels.sandbox.nonparametric import kernels
from statsmodels.tools... | diff --git a/statsmodels/nonparametric/tests/test_kde.py b/statsmodels/nonparametric/tests/test_kde.py
--- a/statsmodels/nonparametric/tests/test_kde.py
+++ b/statsmodels/nonparametric/tests/test_kde.py
@@ -8,6 +8,7 @@
from statsmodels.distributions.mixture_rvs import mixture_rvs
from statsmodels.nonparametric.kde im... | ENH: Let users set KDE bandwidth use a user-defined bandwidth function
#### Describe the bug
Unexpected exception raised for KDE fit() when input data has exactly zero bandwidth.
#### Code Sample (copy-paste works)
```python
from statsmodels.nonparametric.kde import KDEUnivariate
import numpy as np
kde ... | In master you get
```
RuntimeError: Selected KDE bandwidth is 0. Cannot estimate density. Either provide the bandwidth during initialization or use an alternative method.
```
This is the expected outcome. It is then up to downstream users to try catch if they think they might pass unsuitable data.
All you have... | 2020-08-27T07:31:52Z | 0.12 | [
"statsmodels/nonparametric/tests/test_kde.py::TestKDEWGauss::test_compare",
"statsmodels/nonparametric/tests/test_kde.py::TestKDEWGauss::test_evaluate",
"statsmodels/nonparametric/tests/test_kde.py::TestKDEWGauss::test_kernel_constants",
"statsmodels/nonparametric/tests/test_kde.py::TestKDEWCos2::test_evaluat... | [
"statsmodels/nonparametric/tests/test_kde.py::TestKDECustomBandwidth::test_check_is_fit_ok_with_standard_custom_bandwidth",
"statsmodels/nonparametric/tests/test_kde.py::TestKDECustomBandwidth::test_check_is_fit_ok_with_custom_bandwidth",
"statsmodels/nonparametric/tests/test_kde.py::TestKDECustomBandwidth::tes... | Python | [] | [] |
statsmodels/statsmodels | 7,017 | statsmodels__statsmodels-7017 | [
"7009"
] | b37e7d9931a6fa93142f6e6e3a281b0d3ca46abe | diff --git a/statsmodels/tsa/statespace/varmax.py b/statsmodels/tsa/statespace/varmax.py
--- a/statsmodels/tsa/statespace/varmax.py
+++ b/statsmodels/tsa/statespace/varmax.py
@@ -454,16 +454,14 @@ def param_names(self):
# 1. Intercept terms
if self.k_trend > 0:
- for i in self.polynomial_... | diff --git a/statsmodels/tsa/statespace/tests/test_varmax.py b/statsmodels/tsa/statespace/tests/test_varmax.py
--- a/statsmodels/tsa/statespace/tests/test_varmax.py
+++ b/statsmodels/tsa/statespace/tests/test_varmax.py
@@ -1223,3 +1223,60 @@ def test_vma1_exog():
# Have to ignore first 2 observations due to differ... | BUG: User-defined parameter ordering in simulation
#### Description
It seems the element ordering of `params` in VARMAX.simulate and `mod.param_names` is inconsistent. This results in unexpected simulation behavior with user-defined, fixed parameters. See also [this question](https://stackoverflow.com/questions/6363... | Thanks very much for this report. This is definitely a bug. | 2020-09-02T03:31:49Z | 0.12 | [
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVARMA::test_bic",
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVARMA::test_aic",
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVARMA::test_params",
"statsmodels/tsa/statespace/tests/test_varmax.py::TestVARMA::test_mle",
"statsmodels/tsa/... | [
"statsmodels/tsa/statespace/tests/test_varmax.py::test_param_names_trend"
] | Python | [] | [] |
statsmodels/statsmodels | 7,025 | statsmodels__statsmodels-7025 | [
"7014"
] | 04d66900191eab72a479753d1114c044c3520252 | diff --git a/statsmodels/tsa/stattools.py b/statsmodels/tsa/stattools.py
--- a/statsmodels/tsa/stattools.py
+++ b/statsmodels/tsa/stattools.py
@@ -1,13 +1,13 @@
"""
Statistical tools for time series analysis
"""
-import warnings
-
from statsmodels.compat.numpy import lstsq
from statsmodels.compat.pandas import dep... | diff --git a/statsmodels/tsa/tests/test_stattools.py b/statsmodels/tsa/tests/test_stattools.py
--- a/statsmodels/tsa/tests/test_stattools.py
+++ b/statsmodels/tsa/tests/test_stattools.py
@@ -1,30 +1,49 @@
+from statsmodels.compat.numpy import lstsq
+from statsmodels.compat.pandas import assert_index_equal
+from statsmo... | statsmodels.tsa.stattools.coint: UnboundLocalError: local variable 'bestlag' referenced before assignment
#### Describe the bug
If bestlag=0 and autolag='t-stat' an UnboundLocalError results.
If bestlag is >0 and autolag='t-stat' results are normal.
An assert or Warning might be nice.
#### Code Sample, a copy-p... | I cannot reproduce on 0.12. What version are you using?
Seems impossible to raise in 0.12. I'm going to close, but please post if you are experiencing this on 0.12.
It was 0.11.1
I had to do
pip install statsmodels=0.12 --force-reinstall
I still get the error with 0.12:
I added an npz (zipped so it would upload... | 2020-09-04T09:36:11Z | 0.12 | [
"statsmodels/tsa/tests/test_stattools.py::TestKPSS::test_unknown_lags",
"statsmodels/tsa/tests/test_stattools.py::TestKPSS::test_kpss_autolags_does_not_assign_lags_equal_to_nobs",
"statsmodels/tsa/tests/test_stattools.py::TestKPSS::test_store",
"statsmodels/tsa/tests/test_stattools.py::TestKPSS::test_legacy_l... | [
"statsmodels/tsa/tests/test_stattools.py::test_coint_auto_tstat"
] | Python | [] | [] |
statsmodels/statsmodels | 7,028 | statsmodels__statsmodels-7028 | [
"7027"
] | 3d6a49310c106a5129add818b8d5551c6d84588e | diff --git a/statsmodels/robust/scale.py b/statsmodels/robust/scale.py
--- a/statsmodels/robust/scale.py
+++ b/statsmodels/robust/scale.py
@@ -13,14 +13,15 @@
"""
import numpy as np
from scipy.stats import norm as Gaussian
-from . import norms
+
from statsmodels.tools import tools
from statsmodels.tools.validation... | diff --git a/statsmodels/robust/tests/test_scale.py b/statsmodels/robust/tests/test_scale.py
--- a/statsmodels/robust/tests/test_scale.py
+++ b/statsmodels/robust/tests/test_scale.py
@@ -5,25 +5,52 @@
import numpy as np
from numpy.random import standard_normal
from numpy.testing import assert_almost_equal, assert_eq... | BUG: error on passing axis=None to mad
#### Describe the bug
Setting axis=None in the mad function raises "TypeError: '<' not supported between instances of 'NoneType' and 'int'". According to the docs, axis=None is supported. The docs don't say so, but I guess the expected behaviour would be to have the mad applied... | 2020-09-06T22:35:19Z | 0.12 | [
"statsmodels/robust/tests/test_scale.py::TestMadAxes::test_axis2",
"statsmodels/robust/tests/test_scale.py::TestMadAxes::test_axis1",
"statsmodels/robust/tests/test_scale.py::TestMadAxes::test_axisneg1",
"statsmodels/robust/tests/test_scale.py::TestMadAxes::test_axis0",
"statsmodels/robust/tests/test_scale.... | [
"statsmodels/robust/tests/test_scale.py::test_mad_axis_none"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,055 | statsmodels__statsmodels-7055 | [
"7053"
] | 2322d3597a65c6be1f07b36bf15a4bc7c927213b | diff --git a/statsmodels/tsa/holtwinters/results.py b/statsmodels/tsa/holtwinters/results.py
--- a/statsmodels/tsa/holtwinters/results.py
+++ b/statsmodels/tsa/holtwinters/results.py
@@ -743,10 +743,11 @@ def simulate(
if use_boxcox:
y = inv_boxcox(y, lamda)
- sim = np.squeeze(y)
+ ... | diff --git a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
--- a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
+++ b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
@@ -358,7 +358,10 @@ def test_ndarray(self):
@pytest.mark.xfail(reason="... | HoltWintersResults simulation throws ValueError
### **Describe:**
I use the following example codes given on the page (https://www.statsmodels.org/stable/examples/notebooks/generated/exponential_smoothing.html):
fit = ExponentialSmoothing(aust, seasonal_periods=4, trend='add', seasonal='mul', initialization_m... | 2020-09-25T22:27:16Z | 0.12 | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_holt",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_holt_damp_fit",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_holt_damp_r",
"statsmodels/tsa/holtwinters/tests/test... | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_forecast_1_simulation[None-10]",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_forecast_1_simulation[bootstrap-10]"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,228 | statsmodels__statsmodels-7228 | [
"7127"
] | a058516c5f1517a03877cf77f158370c7d1a9d39 | diff --git a/statsmodels/discrete/discrete_model.py b/statsmodels/discrete/discrete_model.py
--- a/statsmodels/discrete/discrete_model.py
+++ b/statsmodels/discrete/discrete_model.py
@@ -774,7 +774,10 @@ def __init__(self, endog, exog, offset=None, exposure=None, missing='none',
super().__init__(endog, exog, c... | diff --git a/statsmodels/discrete/tests/test_count_model.py b/statsmodels/discrete/tests/test_count_model.py
--- a/statsmodels/discrete/tests/test_count_model.py
+++ b/statsmodels/discrete/tests/test_count_model.py
@@ -4,6 +4,7 @@
from numpy.testing import (assert_,
assert_equal, assert_arr... | BUG: fix error in Poisson when offset or exposure is a pd.Series
- [X] closes #7015
- [X] tests added / passed.
- [X] code/documentation is well formatted.
- [X] properly formatted commit message. See
[NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the... | 2020-12-22T20:18:14Z | 0.12 | [
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedPoisson_predict::test_var",
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedPoisson_predict::test_predict_prob",
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedPoisson_predict::test_mean",
"statsmodels/discrete... | [
"statsmodels/discrete/tests/test_count_model.py::TestPandasOffset::test_pd_offset_exposure"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,250 | statsmodels__statsmodels-7250 | [
"7191"
] | 66dc957159f375d5c101f085b421a88a4c8e1c38 | diff --git a/statsmodels/tsa/arima/model.py b/statsmodels/tsa/arima/model.py
--- a/statsmodels/tsa/arima/model.py
+++ b/statsmodels/tsa/arima/model.py
@@ -8,6 +8,8 @@
import warnings
+import numpy as np
+
from statsmodels.tools.data import _is_using_pandas
from statsmodels.tsa.statespace import sarimax
from sta... | diff --git a/statsmodels/tsa/arima/tests/test_model.py b/statsmodels/tsa/arima/tests/test_model.py
--- a/statsmodels/tsa/arima/tests/test_model.py
+++ b/statsmodels/tsa/arima/tests/test_model.py
@@ -239,10 +239,59 @@ def test_clone():
endog = dta['realgdp'].iloc[:100]
exog = np.arange(endog.shape[0])
che... | ENH: Check trend when d > 0 in ARIMA-type models
HI All,
I am new to python so forgive me if I did not explain properly.
I am reading a python time series forecast book. In it they talk of the Arima model and show the code to estimate the model.
The code starts with
from statsmodels.tsa.arima_model import A... | The old method seems to have found a better set of parameters. Looks at the log likelihood, it is a little bit higher. You could try your own starting values and see what happens. I would guess the fits are pretty similar despite the differences in parameter values.
Another thing is that the old `ARIMA` model always... | 2021-01-08T04:47:10Z | 0.12 | [
"statsmodels/tsa/arima/tests/test_model.py::test_cov_type_none",
"statsmodels/tsa/arima/tests/test_model.py::test_yule_walker",
"statsmodels/tsa/arima/tests/test_model.py::test_nonstationary_gls_error",
"statsmodels/tsa/arima/tests/test_model.py::test_append_with_exog_and_trend",
"statsmodels/tsa/arima/test... | [
"statsmodels/tsa/arima/tests/test_model.py::test_forecast",
"statsmodels/tsa/arima/tests/test_model.py::test_forecast_with_exog",
"statsmodels/tsa/arima/tests/test_model.py::test_constant_integrated_model_error"
] | Python | [] | [] |
statsmodels/statsmodels | 7,279 | statsmodels__statsmodels-7279 | [
"6670"
] | a058516c5f1517a03877cf77f158370c7d1a9d39 | diff --git a/statsmodels/stats/contingency_tables.py b/statsmodels/stats/contingency_tables.py
--- a/statsmodels/stats/contingency_tables.py
+++ b/statsmodels/stats/contingency_tables.py
@@ -939,7 +939,7 @@ def __init__(self, tables, shift_zeros=False):
sp = tables.shape
if (len(sp) != 3) or (... | diff --git a/statsmodels/stats/tests/test_contingency_tables.py b/statsmodels/stats/tests/test_contingency_tables.py
--- a/statsmodels/stats/tests/test_contingency_tables.py
+++ b/statsmodels/stats/tests/test_contingency_tables.py
@@ -2,11 +2,13 @@
Tests for contingency table analyses.
"""
+import os
+import warnin... | BUG/ENH: StratifiedTable.test_null_odds fails with integer data
example from meta-analysis PR
`st = smstats.StratifiedTable(ctables.astype(np.float64))`
without converting to float, data is int64 and raises the following exception in summary and test_null_odds()
test_equal_odds() works correctly with integers... | aside: the hypothesis test methods could have a better repr,
Also it could use a generic Bunch instance, e.g. from stats testing tools (to which I added repr and str in my meta-analysis PR, AFAIR, not yet merged )
I get this in notebook
```
st.test_null_odds()
<bunch containing results, print to see contents>
... | 2021-01-25T16:53:39Z | 0.12 | [
"statsmodels/stats/tests/test_contingency_tables.py::TestStratified1::test_null_odds",
"statsmodels/stats/tests/test_contingency_tables.py::TestStratified1::test_equal_odds",
"statsmodels/stats/tests/test_contingency_tables.py::TestStratified1::test_oddsratio_pooled_confint",
"statsmodels/stats/tests/test_con... | [
"statsmodels/stats/tests/test_contingency_tables.py::TestStratified2::test_pandas",
"statsmodels/stats/tests/test_contingency_tables.py::TestStratified2::test_null_odds"
] | Python | [] | [] |
statsmodels/statsmodels | 7,380 | statsmodels__statsmodels-7380 | [
"7377"
] | 48bb953ff16f0230a84e24d8bcc1a1e1b82ed5a0 | diff --git a/statsmodels/base/data.py b/statsmodels/base/data.py
--- a/statsmodels/base/data.py
+++ b/statsmodels/base/data.py
@@ -578,10 +578,12 @@ def attach_rows(self, result):
squeezed = squeezed[None, :]
# May be zero-dim, for example in the case of forecast one step in tsa
if squeez... | diff --git a/statsmodels/tsa/tests/test_ar.py b/statsmodels/tsa/tests/test_ar.py
--- a/statsmodels/tsa/tests/test_ar.py
+++ b/statsmodels/tsa/tests/test_ar.py
@@ -14,6 +14,7 @@
import statsmodels.api as sm
from statsmodels.iolib.summary import Summary
from statsmodels.regression.linear_model import OLS
+from statsmo... | BUG: `attach_rows` does not work when Series change index
#### Describe the bug
When you set the index in a Series constructor with different values it looks up rather than assigns the series.
See https://stackoverflow.com/questions/66523923/how-to-get-residuals-from-statsmodels-autoregresults-model-resid-returns... | 2021-03-13T23:56:36Z | 0.12 | [
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_pvalues",
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_bse",
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_fpe",
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_params",
"statsmodels/tsa/test... | [
"statsmodels/tsa/tests/test_ar.py::test_autoreg_resids"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,383 | statsmodels__statsmodels-7383 | [
"7309"
] | 7d707cfc27a56c8449fdb47b6f37a9fc8b360ea1 | diff --git a/statsmodels/tsa/exponential_smoothing/base.py b/statsmodels/tsa/exponential_smoothing/base.py
--- a/statsmodels/tsa/exponential_smoothing/base.py
+++ b/statsmodels/tsa/exponential_smoothing/base.py
@@ -206,7 +206,10 @@ def _wrap_data(self, data, start_idx, end_idx, names=None):
if data.ndim > 1 an... | diff --git a/statsmodels/tsa/forecasting/tests/test_stl.py b/statsmodels/tsa/forecasting/tests/test_stl.py
--- a/statsmodels/tsa/forecasting/tests/test_stl.py
+++ b/statsmodels/tsa/forecasting/tests/test_stl.py
@@ -3,7 +3,7 @@
import pandas as pd
import pytest
-from statsmodels.datasets import sunspots
+import stat... | STLForecastResults.get_prediction() with ETSModel as model fails when "trend"="mul" in the model kwargs
I get an error when calling the get_prediction() method on a STLForecastResults object that is the output of STLForecast(endog=data, model=ETSModel, model_kwargs={'trend': 'mul'}).fit()
https://github.com/statsmod... | Stlf_model = STLForecast( ts, model =ARIMA, model_kwargs ={ 'order': (2,1,0)}, period =52)
Stlf_model = Stlf_model.fit()
Stlf_model.get_prediction() gives the following error
' Data must be 1-dimensional'
However, Stlf_model.forecast() runs fine.
But I need to get the corresponding confidence interval... | 2021-03-17T15:35:35Z | 0.12 | [
"statsmodels/tsa/forecasting/tests/test_stl.py::test_equivalence_forecast[23-ETSModel]",
"statsmodels/tsa/forecasting/tests/test_stl.py::test_equivalence_forecast[7-ETSModel]",
"statsmodels/tsa/forecasting/tests/test_stl.py::test_smoke",
"statsmodels/tsa/forecasting/tests/test_stl.py::test_equivalence_forecas... | [
"statsmodels/tsa/forecasting/tests/test_stl.py::test_no_var_pred[True]",
"statsmodels/tsa/forecasting/tests/test_stl.py::test_no_var_pred[False]"
] | Python | [] | [] |
statsmodels/statsmodels | 7,413 | statsmodels__statsmodels-7413 | [
"7394"
] | 26dbb94299e5c12221b157ee5837691b6d24a755 | diff --git a/statsmodels/graphics/gofplots.py b/statsmodels/graphics/gofplots.py
--- a/statsmodels/graphics/gofplots.py
+++ b/statsmodels/graphics/gofplots.py
@@ -392,6 +392,7 @@ def qqplot(
line=None,
other=None,
ax=None,
+ swap: bool = False,
**plotkwargs,
):
"... | diff --git a/statsmodels/graphics/tests/test_gofplots.py b/statsmodels/graphics/tests/test_gofplots.py
--- a/statsmodels/graphics/tests/test_gofplots.py
+++ b/statsmodels/graphics/tests/test_gofplots.py
@@ -423,19 +423,31 @@ def test_with_ax(self, close_figures):
@pytest.mark.matplotlib
def test_plot_full_opt... | BUG: fix wrong axis label in qqplot_2samples
The label location is wrong in qqplot_2samples. When data1 and data2 are of equal sizes, x_label will correspond to data2, which is wrong, (it should correspond to data1).
BTW, why permitting different data sizes here? To me, it doesn't make sense for a Q-Q plot to have ... | 2021-04-12T12:47:08Z | 0.12 | [
"statsmodels/graphics/tests/test_gofplots.py::TestQQLine::test_r_fmt",
"statsmodels/graphics/tests/test_gofplots.py::TestQQLine::test_r_fmt_lineoptions",
"statsmodels/graphics/tests/test_gofplots.py::TestQQLine::test_q",
"statsmodels/graphics/tests/test_gofplots.py::TestQQLine::test_45_fmt_lineoptions",
"st... | [
"statsmodels/graphics/tests/test_gofplots.py::test_correct_labels[r-50-30-labels1]",
"statsmodels/graphics/tests/test_gofplots.py::test_correct_labels[45-50-50-labels1]",
"statsmodels/graphics/tests/test_gofplots.py::test_correct_labels[45-30-30-labels1]",
"statsmodels/graphics/tests/test_gofplots.py::test_co... | Python | [] | [] | |
statsmodels/statsmodels | 7,508 | statsmodels__statsmodels-7508 | [
"7507"
] | 6a49f1cc12aa6db9d35f84cca1a2df530d47ecb7 | diff --git a/statsmodels/tsa/exponential_smoothing/base.py b/statsmodels/tsa/exponential_smoothing/base.py
--- a/statsmodels/tsa/exponential_smoothing/base.py
+++ b/statsmodels/tsa/exponential_smoothing/base.py
@@ -103,7 +103,10 @@ def fix_params(self, params):
cache_free_params_index = self._free_params_index... | diff --git a/statsmodels/tsa/statespace/tests/test_fixed_params.py b/statsmodels/tsa/statespace/tests/test_fixed_params.py
--- a/statsmodels/tsa/statespace/tests/test_fixed_params.py
+++ b/statsmodels/tsa/statespace/tests/test_fixed_params.py
@@ -32,6 +32,21 @@ def test_fix_params():
assert_equal(mod._free_params_... | (Minor) BUG: statespace MLEModel throws a false validation error in a rare edge case of nested fix_params
#### Describe the bug
##### Context:
- The parameters we can fix depend on parameters like `enforce_stationarity` and `enforce_invertibility`.
- As an example, when fixing parameters for `mod = SARIMAX(end... | 2021-06-17T05:08:16Z | 0.12 | [
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_results_append",
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_mle_validate",
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_structural",
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_results_extend",
"s... | [
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_varmax_validate",
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_dynamic_factor_validate",
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_sarimax_validate",
"statsmodels/tsa/statespace/tests/test_fixed_params.py::test_str... | Python | [] | [] | |
statsmodels/statsmodels | 7,511 | statsmodels__statsmodels-7511 | [
"7510"
] | f8420a0a085354846092dd046ab2c49a83c649b3 | diff --git a/statsmodels/base/model.py b/statsmodels/base/model.py
--- a/statsmodels/base/model.py
+++ b/statsmodels/base/model.py
@@ -2216,12 +2216,6 @@ def remove_data(self):
cls_attrs[name] = attr
data_attrs = [x for x in cls_attrs
if isinstance(cls_attrs[x], cached_d... | diff --git a/statsmodels/regression/tests/test_quantile_regression.py b/statsmodels/regression/tests/test_quantile_regression.py
--- a/statsmodels/regression/tests/test_quantile_regression.py
+++ b/statsmodels/regression/tests/test_quantile_regression.py
@@ -281,3 +281,11 @@ def test_alpha_summary():
summ_20 = res... | BUG: remove_data faills if model has non-implemented attributes with cache
#### Describe the bug
If there is a non-implemented attribute in the model with cache, `remove_data` fails at `getattr` call in L2224 of model.py.
https://github.com/statsmodels/statsmodels/blob/main/statsmodels/base/model.py#L2224
#### C... | 2021-06-18T12:51:21Z | 0.12 | [
"statsmodels/regression/tests/test_quantile_regression.py::TestGaussianHsheather::test_prsquared",
"statsmodels/regression/tests/test_quantile_regression.py::TestGaussianHsheather::test_df_resid",
"statsmodels/regression/tests/test_quantile_regression.py::TestGaussianHsheather::test_nobs",
"statsmodels/regres... | [
"statsmodels/regression/tests/test_quantile_regression.py::test_remove_data"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,538 | statsmodels__statsmodels-7538 | [
"7527"
] | 5a909860e8b79769cacb3a78254c22eadc8bc324 | diff --git a/statsmodels/tsa/statespace/sarimax.py b/statsmodels/tsa/statespace/sarimax.py
--- a/statsmodels/tsa/statespace/sarimax.py
+++ b/statsmodels/tsa/statespace/sarimax.py
@@ -1879,6 +1879,10 @@ def __init__(self, model, params, filter_results, cov_type=None,
end += k
setattr(self, '_pa... | diff --git a/statsmodels/tsa/statespace/tests/test_save.py b/statsmodels/tsa/statespace/tests/test_save.py
--- a/statsmodels/tsa/statespace/tests/test_save.py
+++ b/statsmodels/tsa/statespace/tests/test_save.py
@@ -39,6 +39,19 @@ def test_sarimax(temp_filename):
assert_allclose(res.llf, res2.llf)
+# GH7527
+@p... | BUG: SARIMAXResults save_model() broken when MA order=0
#### Describe the bug
The SARIMAXResults() save_model() method breaks when the MA order is 0. It gives:
AttributeError: 'SARIMAXResults' object has no attribute '_params_ma'
#### Code Sample, a copy-pastable example if possible
from statsmodels.tsa.stat... | 2021-07-06T09:10:04Z | 0.12 | [
"statsmodels/tsa/statespace/tests/test_save.py::test_structural",
"statsmodels/tsa/statespace/tests/test_save.py::test_dynamic_factor_pickle",
"statsmodels/tsa/statespace/tests/test_save.py::test_structural_pickle",
"statsmodels/tsa/statespace/tests/test_save.py::test_sarimax_pickle",
"statsmodels/tsa/state... | [
"statsmodels/tsa/statespace/tests/test_save.py::test_sarimax_save_remove_data[order0]",
"statsmodels/tsa/statespace/tests/test_save.py::test_sarimax_save_remove_data[order2]",
"statsmodels/tsa/statespace/tests/test_save.py::test_sarimax_save_remove_data[order1]"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,574 | statsmodels__statsmodels-7574 | [
"7565"
] | 195be20082b3e4b1884e7370a401aaf7fab3ced9 | diff --git a/statsmodels/tsa/holtwinters/results.py b/statsmodels/tsa/holtwinters/results.py
--- a/statsmodels/tsa/holtwinters/results.py
+++ b/statsmodels/tsa/holtwinters/results.py
@@ -283,14 +283,16 @@ def forecast(self, steps=1):
"""
try:
freq = getattr(self.model._index, "freq", 1)
-... | diff --git a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
--- a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
+++ b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
@@ -808,7 +808,9 @@ def test_invalid_seasonal(seasonal):
def test_2d_data(... | BUG: Check `freq` only when useful in forecasting.
#### Describe the bug
I'm getting above TypeError while executing line 23 (forcast()) even though my frequency is not 'str'.
#### Code Sample, a copy-pastable example if possible
```python
from statsmodels.tsa.holtwinters import ExponentialSmoothing as HWE... | Running the code below on master produces no errors.
```python
from statsmodels.tsa.holtwinters import ExponentialSmoothing as HWES
import numpy as np
y = np.random.standard_normal(144*1000)
#build and train the model on the training data
model = HWES(y, seasonal_periods=144, trend='add', seasonal='add')
... | 2021-07-14T11:44:39Z | 0.12 | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_simulate_expected_r[add-False-mul-mul]",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_invalid_start_param_length",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_simulate_expected_r[mul-True-mul-mul]",
"statsmodels/tsa/... | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_invalid_index"
] | Python | [] | [] |
statsmodels/statsmodels | 7,581 | statsmodels__statsmodels-7581 | [
"7199"
] | 1745692ba1a092e0646493ab8956ee66e0c43397 | diff --git a/statsmodels/base/model.py b/statsmodels/base/model.py
--- a/statsmodels/base/model.py
+++ b/statsmodels/base/model.py
@@ -1075,7 +1075,6 @@ def predict(self, exog=None, transform=True, *args, **kwargs):
else:
exog_index = [exog.index.name]
-
if transform and hasattr... | diff --git a/statsmodels/iolib/tests/test_pickle.py b/statsmodels/iolib/tests/test_pickle.py
--- a/statsmodels/iolib/tests/test_pickle.py
+++ b/statsmodels/iolib/tests/test_pickle.py
@@ -1,11 +1,13 @@
+from statsmodels.compat.python import lrange
+
from io import BytesIO
+import os
import pathlib
import tempfile
... | ENH: Allow both pathlib and string paths for file io operations such as load and save
Using an object which inherits pathlib.Path and overrides the open method breaks, as it tries to open it with the builtin open method and the given path is from the s3 (this behaviour is implemented in the custom object).
```python... | 2021-07-15T16:18:22Z | 0.12 | [
"statsmodels/iolib/tests/test_pickle.py::test_pickle"
] | [
"statsmodels/iolib/tests/test_pickle.py::test_pickle_supports_open"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,582 | statsmodels__statsmodels-7582 | [
"7343"
] | 592133c8c494ba844a2cea96ef8ec7e165136cab | diff --git a/statsmodels/graphics/tsaplots.py b/statsmodels/graphics/tsaplots.py
--- a/statsmodels/graphics/tsaplots.py
+++ b/statsmodels/graphics/tsaplots.py
@@ -2,6 +2,7 @@
from statsmodels.compat.pandas import deprecate_kwarg
import calendar
+import warnings
import numpy as np
import pandas as pd
@@ -245,7 +... | diff --git a/statsmodels/graphics/tests/test_tsaplots.py b/statsmodels/graphics/tests/test_tsaplots.py
--- a/statsmodels/graphics/tests/test_tsaplots.py
+++ b/statsmodels/graphics/tests/test_tsaplots.py
@@ -71,8 +71,10 @@ def test_plot_pacf(close_figures):
armaprocess = tsp.ArmaProcess(ar, ma)
rs = np.random.... | BUG: Change default pacf method
#### Describe the bug
I found the calculated partial autocorrelation would be larger than 1 using sm.graphics.tsa.plot_pacf.
#### Code Sample
```python
import statsmodels.api as sm
import numpy as np
import matplotlib.pyplot as plt
x=np.linspace(0,1,num=512)
f=20
y=np.cos(2*... | Change the method to "ywmle" or "old". The default option here is a poor choice and can produce insane plats. It should be changed.
Thanks for your reply! It works reasonably after changing the method to 'ols' or 'ywmle'.
Hello @bashtage , is there a plan to change the default pacf method in the future?
Probably ... | 2021-07-16T07:02:35Z | 0.12 | [
"statsmodels/graphics/tests/test_tsaplots.py::test_predict_plot[0.1-False-model_and_args1]",
"statsmodels/graphics/tests/test_tsaplots.py::test_plot_quarter",
"statsmodels/graphics/tests/test_tsaplots.py::test_predict_plot[0.1-True-model_and_args0]",
"statsmodels/graphics/tests/test_tsaplots.py::test_predict_... | [
"statsmodels/graphics/tests/test_tsaplots.py::test_plot_pacf_kwargs",
"statsmodels/graphics/tests/test_tsaplots.py::test_plot_pacf",
"statsmodels/graphics/tests/test_tsaplots.py::test_plot_pacf_irregular"
] | Python | [] | [] |
statsmodels/statsmodels | 7,612 | statsmodels__statsmodels-7612 | [
"7610"
] | a316f85004332bd29a7d62358337bce9901a0c51 | diff --git a/statsmodels/graphics/agreement.py b/statsmodels/graphics/agreement.py
--- a/statsmodels/graphics/agreement.py
+++ b/statsmodels/graphics/agreement.py
@@ -6,6 +6,7 @@
'''
import numpy as np
+
from . import utils
diff --git a/statsmodels/graphics/api.py b/statsmodels/graphics/api.py
--- a/statsmodel... | diff --git a/statsmodels/graphics/tests/test_agreement.py b/statsmodels/graphics/tests/test_agreement.py
--- a/statsmodels/graphics/tests/test_agreement.py
+++ b/statsmodels/graphics/tests/test_agreement.py
@@ -4,7 +4,6 @@
from statsmodels.graphics.agreement import mean_diff_plot
-
try:
import matplotlib.pyp... | Mistake in labels of qqplot_2samples
#### Describe the bug
statsmodels.graphics.gofplots.qqplot_2samples docs have a bug.
data1 appears on y-axis and data2 appears on x-axis. This is contrary to what is mentioned in the docs.
#### Code Sample, a copy-pastable example if possible
```python
import matplotl... | 2021-07-30T11:02:33Z | 0.12 | [
"statsmodels/graphics/tests/test_regressionplots.py::TestCERESPlot::test_ceres_poisson",
"statsmodels/graphics/tests/test_regressionplots.py::TestABLine::test_abline_model",
"statsmodels/graphics/tests/test_regressionplots.py::TestABLine::test_abline_ab_ax",
"statsmodels/graphics/tests/test_regressionplots.py... | [
"statsmodels/graphics/tests/test_gofplots.py::test_correct_labels[r-50-50-labels1]",
"statsmodels/graphics/tests/test_gofplots.py::test_correct_labels[45-50-50-labels1]",
"statsmodels/graphics/tests/test_gofplots.py::test_correct_labels[q-30-30-labels0]",
"statsmodels/graphics/tests/test_gofplots.py::test_cor... | Python | [] | [] | |
statsmodels/statsmodels | 7,668 | statsmodels__statsmodels-7668 | [
"7466"
] | b05b9df816a7d0e4adba791543eaa1d2525bb7c3 | diff --git a/statsmodels/stats/multitest.py b/statsmodels/stats/multitest.py
--- a/statsmodels/stats/multitest.py
+++ b/statsmodels/stats/multitest.py
@@ -152,7 +152,7 @@ def multipletests(pvals, alpha=0.05, method='hs', is_sorted=False,
elif method.lower() in ['s', 'sidak']:
reject = pvals <= alphacSid... | diff --git a/statsmodels/stats/tests/test_multi.py b/statsmodels/stats/tests/test_multi.py
--- a/statsmodels/stats/tests/test_multi.py
+++ b/statsmodels/stats/tests/test_multi.py
@@ -343,6 +343,14 @@ def test_issorted(method):
assert_allclose(res2[0][sortrevind], res1[0], rtol=1e-10)
+@pytest.mark.parametrize(... | handle multitests floating point precision issue #7465
- [ ] closes #7465
- [ ] tests added / passed.
- [ ] code/documentation is well formatted.
- [ ] properly formatted commit message. See
[NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-m... | 2021-08-24T15:40:32Z | 0.12 | [
"statsmodels/stats/tests/test_multi.py::TestMultiTests3::test_multi_pvalcorrection_rmethods[rawp-val8]",
"statsmodels/stats/tests/test_multi.py::TestMultiTests3::test_multi_pvalcorrection_rmethods[Hochberg-val3]",
"statsmodels/stats/tests/test_multi.py::TestMultiTests3::test_multi_pvalcorrection_rmethods[SidakS... | [
"statsmodels/stats/tests/test_multi.py::test_floating_precision[s]",
"statsmodels/stats/tests/test_multi.py::test_floating_precision[hs]"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,670 | statsmodels__statsmodels-7670 | [
"4952"
] | be535762961792866f2ade882445f46ea716c665 | diff --git a/statsmodels/discrete/count_model.py b/statsmodels/discrete/count_model.py
--- a/statsmodels/discrete/count_model.py
+++ b/statsmodels/discrete/count_model.py
@@ -60,11 +60,13 @@ def __init__(self, endog, exog, exog_infl=None, offset=None,
if exog_infl is None:
self.k_inflate = 1
+ ... | diff --git a/statsmodels/discrete/tests/test_count_model.py b/statsmodels/discrete/tests/test_count_model.py
--- a/statsmodels/discrete/tests/test_count_model.py
+++ b/statsmodels/discrete/tests/test_count_model.py
@@ -144,19 +144,18 @@ def test_exposure(self):
assert_allclose(res3.params, self.res1.params, ... | Zero-Inflated Poisson/Negative Binomial: not predicting for arrays of different size?
**edit** same bug as #4757
Hi,
I am modelling a discrete skewed distribution with several of the available methods in `statsmodels`, namely: `Poisson`, `Negative Binomial`, `Zero Inflated Poisson`, and `Zero Inflated Negative B... | I forgot to mention that the same procedure that you see here for the zero inflated models is applied above it to the normal poisson and negative binomial with not problem. Thanks.
Hi, there is a good chance that this is a bug. Given that the models are new, there might be cases that are not included in the test suite ... | 2021-08-24T23:30:19Z | 0.12 | [
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedModel_logit::test_fit_regularized_invalid_method",
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedModel_logit::test_t",
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedModel_logit::test_fit_regularized",
"stats... | [
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedModel_offset::test_exposure",
"statsmodels/discrete/tests/test_count_model.py::TestZeroInflatedPoisson_predict::test_predict_options"
] | Python | [] | [] |
statsmodels/statsmodels | 7,673 | statsmodels__statsmodels-7673 | [
"7672"
] | b2397a21cd9ffcf1f52593380816d3bdfd8a7f0d | diff --git a/statsmodels/graphics/regressionplots.py b/statsmodels/graphics/regressionplots.py
--- a/statsmodels/graphics/regressionplots.py
+++ b/statsmodels/graphics/regressionplots.py
@@ -301,7 +301,7 @@ def _partial_regression(endog, exog_i, exog_others):
def plot_partregress(endog, exog_i, exog_others, data=Non... | diff --git a/statsmodels/graphics/tests/test_regressionplots.py b/statsmodels/graphics/tests/test_regressionplots.py
--- a/statsmodels/graphics/tests/test_regressionplots.py
+++ b/statsmodels/graphics/tests/test_regressionplots.py
@@ -348,3 +348,25 @@ def test_ceres_poisson(self, close_figures):
ax.set... | PatsyError with custom function when trying to plot partial regression
#### Describe the bug
I am experiencing an `PatsyError` where `patsy` dose not recognize the custom function `lg()` in the name space. This happened with the `statsmodels.api.graphics.plot_partregress()` function.
#### Code Sample, a copy-past... | Does not work for me either.
I don't understand why adding `eval_env` to the dmatrix calls does not help. :(
(I'm running the example in a notebook.)
I still have no idea why patsy doesn't find it.
However, putting the call to plot_partialregress into a unit test function and eval_env=1, works with a pytest run ... | 2021-08-28T17:26:24Z | 0.12 | [
"statsmodels/graphics/tests/test_regressionplots.py::TestCERESPlot::test_ceres_poisson",
"statsmodels/graphics/tests/test_regressionplots.py::TestPartialResidualPlot::test_partial_residual_poisson",
"statsmodels/graphics/tests/test_regressionplots.py::TestPlot::test_plot_fit",
"statsmodels/graphics/tests/test... | [
"statsmodels/graphics/tests/test_regressionplots.py::test_partregress_formula_env"
] | Python | [] | [] |
statsmodels/statsmodels | 7,693 | statsmodels__statsmodels-7693 | [
"6577"
] | c1ecba96eea169f950b2245c99e368d75c076429 | diff --git a/statsmodels/genmod/generalized_linear_model.py b/statsmodels/genmod/generalized_linear_model.py
--- a/statsmodels/genmod/generalized_linear_model.py
+++ b/statsmodels/genmod/generalized_linear_model.py
@@ -1768,7 +1768,7 @@ def aic(self):
Akaike Information Criterion
-2 * `llf` + 2 * (`df... | diff --git a/statsmodels/genmod/tests/test_glm.py b/statsmodels/genmod/tests/test_glm.py
--- a/statsmodels/genmod/tests/test_glm.py
+++ b/statsmodels/genmod/tests/test_glm.py
@@ -2540,6 +2540,7 @@ def test_output_exposure_null(reset_randomstate):
# Check that they are different
assert np.abs(null_model_withou... | AIC value inconsistent with R
#### Describe the bug
The definition of AIC in linear regression (sm.api.OLS()) does not match that of R. This is due to the fact that the number of parameters is defined as (df_model + 1), which does not take into account the variance term that is also estimated from the data. (This is... | same issue for BIC #1802
no decision to change it yet
Label this as a FAQ. I think we are past the point where this can change.
Still showing in 0.12
If it's wrong, could it be corrected?
It's not just a diagnostic: if you're using the AIC/BIC to compare models, it can have a material effect.
It does _not_ affec... | 2021-09-06T17:24:20Z | 0.12 | [
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoisson::test_null_deviance",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoisson::test_deviance",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoisson::test_scale",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoisson::test_standard_errors",
"st... | [
"statsmodels/genmod/tests/test_glm.py::test_qaic",
"statsmodels/regression/tests/test_regression.py::TestWLS_GLS::test_aic",
"statsmodels/regression/tests/test_regression.py::TestWLSExogWeights::test_aic",
"statsmodels/regression/tests/test_regression.py::TestOLS::test_aic",
"statsmodels/regression/tests/te... | Python | [] | [] |
statsmodels/statsmodels | 7,696 | statsmodels__statsmodels-7696 | [
"6880"
] | c98477a45cbeffc12e192184e5d47a2cb74536dc | diff --git a/statsmodels/regression/linear_model.py b/statsmodels/regression/linear_model.py
--- a/statsmodels/regression/linear_model.py
+++ b/statsmodels/regression/linear_model.py
@@ -2618,7 +2618,7 @@ def get_prediction(self, exog=None, transform=True, weights=None,
self, exog=exog, transform=transform... | diff --git a/statsmodels/regression/tests/test_regression.py b/statsmodels/regression/tests/test_regression.py
--- a/statsmodels/regression/tests/test_regression.py
+++ b/statsmodels/regression/tests/test_regression.py
@@ -331,6 +331,12 @@ def test_norm_resid(self):
model_norm_resid = self.res1.resid_pearson
... | slim ols results
Add slim parameter to summary function. slim=True generates a minimal result table, default or slim=False generates the original output.
- [ ] closes #xxxx
- [ ] tests added / passed.
- [x] code/documentation is well formatted.
- [ ] properly formatted commit message. See
[NumPy's gui... |
[](https://coveralls.io/builds/32080879)
Coverage increased (+0.003%) to 88.029% when pulling **69460e0c4dd386b15f9f361326866e5376c2c77a on janosbiro:slim-results** into **5c6e3f1a3b417b58c932c52ef885fa29c7d00b15 on statsmodels:master**.
This pull request... | 2021-09-07T00:01:56Z | 0.12 | [
"statsmodels/regression/tests/test_regression.py::TestOLS::test_degrees",
"statsmodels/regression/tests/test_regression.py::TestOLS::test_resids",
"statsmodels/regression/tests/test_regression.py::TestOLS::test_HC3_errors",
"statsmodels/regression/tests/test_regression.py::TestOLS::test_params",
"statsmodel... | [
"statsmodels/regression/tests/test_regression.py::TestOLS::test_summary_slim"
] | Python | [] | [] |
statsmodels/statsmodels | 7,697 | statsmodels__statsmodels-7697 | [
"7663"
] | 01367e91d6597bc526cb39bc62f671a77c8fc1af | diff --git a/statsmodels/nonparametric/kde.py b/statsmodels/nonparametric/kde.py
--- a/statsmodels/nonparametric/kde.py
+++ b/statsmodels/nonparametric/kde.py
@@ -33,6 +33,7 @@
triw=kernels.Triweight,
cos=kernels.Cosine,
cos2=kernels.Cosine2,
+ tric=kernels.Tricube
)
diff --git a/statsmodels/sand... | diff --git a/statsmodels/nonparametric/tests/test_kernels.py b/statsmodels/nonparametric/tests/test_kernels.py
--- a/statsmodels/nonparametric/tests/test_kernels.py
+++ b/statsmodels/nonparametric/tests/test_kernels.py
@@ -149,3 +149,19 @@ class TestBiweight(CheckKernelMixin):
kern = kernels.Biweight()
se_n_d... | Adding more kernels in KDE
Statsmodels consists of various different kernels but few additions such as exponential kernel and quartic kernel could be a good addition to the group of kernels.
The additions would be similar as other kernels, classes would be created in <code>statsmodels/sandbox/nonparametric/kernel... | Do you have any code for those?
I added asymmetric kernels, beta kernel (kernels for unit interval) and kernels for positive valued random variables, but they don't use an interface that is compatible with the older kernel functions in nonparametric, at least not with those used for MultivariateKDE.
Asymmetric k... | 2021-09-07T15:19:21Z | 0.12 | [
"statsmodels/nonparametric/tests/test_kernels.py::TestEpan::test_smoothconf_data",
"statsmodels/nonparametric/tests/test_kernels.py::TestEpan::test_smoothconf",
"statsmodels/nonparametric/tests/test_kernels.py::TestUniform::test_smoothconf_data",
"statsmodels/nonparametric/tests/test_kernels.py::TestUniform::... | [
"statsmodels/nonparametric/tests/test_kernels.py::test_tricube"
] | Python | [] | [] |
statsmodels/statsmodels | 7,704 | statsmodels__statsmodels-7704 | [
"6780"
] | 5f8d374f5123f58e2475bcb6ce215b7687eadceb | diff --git a/statsmodels/stats/outliers_influence.py b/statsmodels/stats/outliers_influence.py
--- a/statsmodels/stats/outliers_influence.py
+++ b/statsmodels/stats/outliers_influence.py
@@ -6,19 +6,19 @@
Author: Josef Perktold
License: BSD-3
"""
+from statsmodels.compat.pandas import Appender
+from statsmodels.comp... | diff --git a/statsmodels/stats/tests/test_outliers_influence.py b/statsmodels/stats/tests/test_outliers_influence.py
--- a/statsmodels/stats/tests/test_outliers_influence.py
+++ b/statsmodels/stats/tests/test_outliers_influence.py
@@ -1,16 +1,28 @@
+import numpy as np
from numpy.testing import assert_almost_equal
f... | ENH: Add pandas dataframe capability to variance_inflation_factor
Proposing a small change to the variance_inflation_factor() method in the outliers_influence package, in order to allow `exog` input to be a pandas DataFrame as well as a numpy array.
In the test, the value computed for the VIF using my proposed code ... | 2021-09-08T16:48:17Z | 0.12 | [] | [
"statsmodels/stats/tests/test_outliers_influence.py::test_reset_stata"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,709 | statsmodels__statsmodels-7709 | [
"7446"
] | d503f0b5811b807ee79bd9b0fcf1fd0e336fadc1 | diff --git a/statsmodels/tsa/arima_process.py b/statsmodels/tsa/arima_process.py
--- a/statsmodels/tsa/arima_process.py
+++ b/statsmodels/tsa/arima_process.py
@@ -16,16 +16,25 @@
Author: josefpktd
License: BSD
"""
+from statsmodels.compat.pandas import Appender
+
import numpy as np
-from scipy import signal, optimi... | diff --git a/statsmodels/tsa/tests/test_arima_process.py b/statsmodels/tsa/tests/test_arima_process.py
--- a/statsmodels/tsa/tests/test_arima_process.py
+++ b/statsmodels/tsa/tests/test_arima_process.py
@@ -1,4 +1,4 @@
-from unittest import TestCase
+import datetime as dt
import numpy as np
from numpy.testing impor... | BUG: Remove/rewrite from_estimation from ArmaProcess
#### Describe the bug
An attempt to create a pure AR model results in attribute error
#### Code Sample, a copy-pastable example if possible
```python
import numpy as np
import statsmodels
from statsmodels.tsa.arima_process import ArmaProcess
from stats... | You are using the wrong `ARIMA`. Unfortunately the right `ARIMA` is deprecated, and so the only workaround is to parse the model parameters yourself to ArmaProcess.
Oh, I see. Thanks for reply then!
Closing as answered. | 2021-09-09T08:40:32Z | 0.12 | [
"statsmodels/tsa/tests/test_arima_process.py::test_arma_generate_sample[standard_normal-ma0-ar1]",
"statsmodels/tsa/tests/test_arima_process.py::test_spectrum[ma2-ar1]",
"statsmodels/tsa/tests/test_arima_process.py::test_armafft[ma3-ar3]",
"statsmodels/tsa/tests/test_arima_process.py::test_spectrum[ma1-ar3]",... | [
"statsmodels/tsa/tests/test_arima_process.py::test_from_estimation[True-1]",
"statsmodels/tsa/tests/test_arima_process.py::test_from_estimation[True-0]"
] | Python | [] | [] |
statsmodels/statsmodels | 7,710 | statsmodels__statsmodels-7710 | [
"7321"
] | 152ac7b2eb31404b46f5f0f5f080f9abc5ce89b6 | diff --git a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py
--- a/statsmodels/stats/descriptivestats.py
+++ b/statsmodels/stats/descriptivestats.py
@@ -525,6 +525,9 @@ def _safe_jarque_bera(c):
output = f"{{0:{fmt}}}%"
perc.index = [output.format(val) for val in ... | diff --git a/statsmodels/stats/tests/test_descriptivestats.py b/statsmodels/stats/tests/test_descriptivestats.py
--- a/statsmodels/stats/tests/test_descriptivestats.py
+++ b/statsmodels/stats/tests/test_descriptivestats.py
@@ -164,7 +164,15 @@ def test_description_basic(df):
def test_odd_percentiles(df):
percenti... | BUG: fix percentiles being dropped in Description frame.
- [x] closes #7316
- [x] tests added / passed.
- [x] code/documentation is well formatted.
- [x] properly formatted commit message
@bashtage I am not very familiar with this function, so if you have a moment to check if I did something sensible, that wou... | 2021-09-09T09:35:56Z | 0.12 | [
"statsmodels/stats/tests/test_descriptivestats.py::TestSimpleTable::test_basic_2",
"statsmodels/stats/tests/test_descriptivestats.py::TestSimpleTable::test_basic_4",
"statsmodels/stats/tests/test_descriptivestats.py::TestSimpleTable::test_describe_summary_float_ndarray",
"statsmodels/stats/tests/test_descript... | [
"statsmodels/stats/tests/test_descriptivestats.py::test_odd_percentiles"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,713 | statsmodels__statsmodels-7713 | [
"6095"
] | 9245093d15f2eca00c74cb45a68836948a8ff17a | diff --git a/statsmodels/stats/oaxaca.py b/statsmodels/stats/oaxaca.py
--- a/statsmodels/stats/oaxaca.py
+++ b/statsmodels/stats/oaxaca.py
@@ -1,6 +1,6 @@
-# TODO Variance can be calculated for the three_fold
-# TODO Group Size Effects can be accounted for
-# TODO Non-Linear Oaxaca-Blinder can be used
+# TODO Non-Linea... | diff --git a/statsmodels/stats/tests/test_oaxaca.py b/statsmodels/stats/tests/test_oaxaca.py
--- a/statsmodels/stats/tests/test_oaxaca.py
+++ b/statsmodels/stats/tests/test_oaxaca.py
@@ -3,6 +3,9 @@
# so I cannot test for having no intercept. This also would make
# no sense for Oaxaca. All of these stata_results
# a... | WIP: Oaxaca Variance/Other Models
Hi everyone.
I should have added more ability for the end user to choose what type of non-discriminatory model they would like. It used to be a pooled only model, but now users can pass into two_fold() optionally what type of non-discriminatory model they wish to. I have checked the... | 2021-09-09T14:56:29Z | 0.12 | [
"statsmodels/stats/tests/test_oaxaca.py::TestOaxacaNoSwap::test_results",
"statsmodels/stats/tests/test_oaxaca.py::TestOaxacaPandasNoSwapNoConstPassed::test_results",
"statsmodels/stats/tests/test_oaxaca.py::TestOaxacaNoConstPassed::test_results",
"statsmodels/stats/tests/test_oaxaca.py::TestOaxacaPandas::tes... | [
"statsmodels/stats/tests/test_oaxaca.py::TestZeroModel::test_results",
"statsmodels/stats/tests/test_oaxaca.py::TestPooledModel::test_results",
"statsmodels/stats/tests/test_oaxaca.py::TestOneModel::test_results",
"statsmodels/stats/tests/test_oaxaca.py::TestOmegaModel::test_results",
"statsmodels/stats/tes... | Python | [] | [] | |
statsmodels/statsmodels | 7,721 | statsmodels__statsmodels-7721 | [
"5199"
] | ba72432abcf2b36664588511a1512ed79ff01fd4 | diff --git a/statsmodels/tools/validation/validation.py b/statsmodels/tools/validation/validation.py
--- a/statsmodels/tools/validation/validation.py
+++ b/statsmodels/tools/validation/validation.py
@@ -59,7 +59,7 @@ def array_like(
of obj (if present) or uses NumPy to automatically detect the dtype
ndim ... | diff --git a/statsmodels/tsa/tests/test_stattools.py b/statsmodels/tsa/tests/test_stattools.py
--- a/statsmodels/tsa/tests/test_stattools.py
+++ b/statsmodels/tsa/tests/test_stattools.py
@@ -30,6 +30,7 @@
from statsmodels.tsa.stattools import (
acf,
acovf,
+ ccovf,
adfuller,
arma_order_select_ic... | Speed up the cross-correlation function
Dears,
I noticed that the computation of the cross corrlation function is extremely slower than the autocorrelation function.
It seems to me that this is because of two reasons, but I am not an expert in the field:
* acf function lets fix the nlags parameter and ccf does ... | It's possible to add all the same methods as in adf to ccf.
I guess, without looking, that acf and ccf could share most of the code | 2021-09-12T19:07:42Z | 0.13dev | [
"statsmodels/tsa/tests/test_stattools.py::TestADFNoConstant2::test_critvalues",
"statsmodels/tsa/tests/test_stattools.py::TestADFNoConstant2::test_teststat",
"statsmodels/tsa/tests/test_stattools.py::TestADFNoConstant2::test_pvalue",
"statsmodels/tsa/tests/test_stattools.py::TestADFNoConstant2::test_store_str... | [
"statsmodels/tsa/tests/test_stattools.py::test_ccovf_fft_vs_convolution[False-True]",
"statsmodels/tsa/tests/test_stattools.py::test_compare_acovf_vs_ccovf[True-True-True]",
"statsmodels/tsa/tests/test_stattools.py::test_compare_acovf_vs_ccovf[False-True-True]",
"statsmodels/tsa/tests/test_stattools.py::test_... | Python | [] | [] |
statsmodels/statsmodels | 7,748 | statsmodels__statsmodels-7748 | [
"7747"
] | f78148ec4423bb7b06873a41e7f2abcd6edb511c | diff --git a/statsmodels/iolib/summary.py b/statsmodels/iolib/summary.py
--- a/statsmodels/iolib/summary.py
+++ b/statsmodels/iolib/summary.py
@@ -718,7 +718,6 @@ def summary_return(tables, return_fmt='text'):
elif return_fmt == 'latex':
# TODO: insert \hline after updating SimpleTable
table = co... | diff --git a/statsmodels/discrete/tests/test_discrete.py b/statsmodels/discrete/tests/test_discrete.py
--- a/statsmodels/discrete/tests/test_discrete.py
+++ b/statsmodels/discrete/tests/test_discrete.py
@@ -142,6 +142,16 @@ def test_jac(self):
score = self.res1.model.score(self.res1.params)
assert_alm... | summary.as_latex() output missing 1 row
#### Describe the bug
i compared the console output summary() and summary.as_latex(), found that the last row of result table gone missing.
#### Code Sample, a copy-pastable example if possible
```python
print(logit.summary().as_latex())
print(logit.summary())
```
... | ~~I don't see it.~~
Both pictures show the same 6 parameter rows
last line of top table is missing.
It's better to post the text version than a screen shot.
[image](https://github.com/BecksIsAlreadyTaken/Troubleshooting/blob/main/Screenshot%20from%202021-09-24%2000-06-52.png)
missing the "Covariance Type:" and ... | 2021-09-23T19:57:03Z | 0.13dev | [
"statsmodels/discrete/tests/test_discrete.py::TestNegativeBinomialNBP2Null::test_llnull",
"statsmodels/discrete/tests/test_discrete.py::TestNegativeBinomialNBP2Null::test_start_null",
"statsmodels/discrete/tests/test_discrete.py::TestLogitL1::test_params",
"statsmodels/discrete/tests/test_discrete.py::TestLog... | [
"statsmodels/discrete/tests/test_discrete.py::TestNegativeBinomialNB2BFGS::test_summary_latex",
"statsmodels/discrete/tests/test_discrete.py::TestNegativeBinomialNB1BFGS::test_summary_latex",
"statsmodels/discrete/tests/test_discrete.py::TestLogitBFGS::test_summary_latex",
"statsmodels/discrete/tests/test_dis... | Python | [] | [] |
statsmodels/statsmodels | 7,751 | statsmodels__statsmodels-7751 | [
"7755"
] | 4cf63aaae36581c04bb891ad49ab1ea3be76fb2f | diff --git a/statsmodels/base/_penalized.py b/statsmodels/base/_penalized.py
--- a/statsmodels/base/_penalized.py
+++ b/statsmodels/base/_penalized.py
@@ -51,7 +51,7 @@ def __init__(self, *args, **kwds):
self._init_keys.extend(['penal', 'pen_weight'])
self._null_drop_keys = getattr(self, '_null_drop... | diff --git a/statsmodels/discrete/tests/test_discrete.py b/statsmodels/discrete/tests/test_discrete.py
--- a/statsmodels/discrete/tests/test_discrete.py
+++ b/statsmodels/discrete/tests/test_discrete.py
@@ -45,6 +45,7 @@
ConvergenceWarning,
PerfectSeparationError,
SpecificationWarning,
+ ValueWarning,... | BUG: GLS fit_regularized, different params if sigma is 1-dim or diag 2 dim
I don't see the problem right now. Needs investigating.
Fixing a unit test for GLS.fit_regularized that used incorrect kwarg "weights" #7751
I think the results, specifically params, should be the same if `sigma = 1/ wghts` and `sigma = np... | 2021-09-24T15:40:42Z | 0.13dev | [
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonNewton::test_bic",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonNewton::test_null_deviance",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonNewton::test_aic",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonNewton::test_scale"... | [
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmGammaNewton::test_init_kwargs",
"statsmodels/discrete/tests/test_discrete.py::TestProbitNewton::test_init_kwargs",
"statsmodels/regression/tests/test_regression.py::test_regularized_predict"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,757 | statsmodels__statsmodels-7757 | [
"7353"
] | e741f3b22302199121090822353f20d794a02148 | diff --git a/statsmodels/miscmodels/ordinal_model.py b/statsmodels/miscmodels/ordinal_model.py
--- a/statsmodels/miscmodels/ordinal_model.py
+++ b/statsmodels/miscmodels/ordinal_model.py
@@ -6,6 +6,8 @@
License: BSD-3
"""
+import warnings
+
from statsmodels.compat.pandas import Appender
import numpy as np
@@ -1... | diff --git a/statsmodels/genmod/tests/test_glm.py b/statsmodels/genmod/tests/test_glm.py
--- a/statsmodels/genmod/tests/test_glm.py
+++ b/statsmodels/genmod/tests/test_glm.py
@@ -1176,16 +1176,16 @@ def check_score_hessian(results):
# avoid checking score at MLE, score close to zero
sc = results.model.score(p... | missing endog values in OrderedModel
#### Describe the bug
OrderedModel produces one threshold per occurrence of nan in endog.
If not a pandas Categorical, Labels in OrderedModel are computed using `np.unique` [here](https://github.com/statsmodels/statsmodels/blob/a91eea01799b2fa1bcafe0dea0f00076091d9f5e/statsm... | 2021-09-26T22:51:14Z | 0.13dev | [
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonHC0::test_standard_errors",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonHC0::test_tpvalues",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonHC0::test_null_deviance",
"statsmodels/genmod/tests/test_glm.py::TestWtdGlmPoissonHC0::test_s... | [
"statsmodels/miscmodels/tests/test_ordinal_model.py::test_nan_endog_exceptions"
] | Python | [
"https://user-images.githubusercontent.com/151929/109388759-56088e80-7909-11eb-953c-5b28a6c70aa7.png"
] | [] | |
statsmodels/statsmodels | 7,772 | statsmodels__statsmodels-7772 | [
"7771"
] | b8b86097f8e20fb0d132a2ae84fa9a3e0a45e499 | diff --git a/statsmodels/stats/meta_analysis.py b/statsmodels/stats/meta_analysis.py
--- a/statsmodels/stats/meta_analysis.py
+++ b/statsmodels/stats/meta_analysis.py
@@ -276,13 +276,31 @@ def summary_frame(self, alpha=0.05, use_t=None):
results = pd.DataFrame(res, index=labels, columns=col_names)
ret... | diff --git a/statsmodels/stats/tests/test_meta.py b/statsmodels/stats/tests/test_meta.py
--- a/statsmodels/stats/tests/test_meta.py
+++ b/statsmodels/stats/tests/test_meta.py
@@ -11,6 +11,7 @@
import numpy as np
import pandas as pd
+import pytest
from numpy.testing import assert_equal, assert_allclose
@@ -353,... | ENH: allow to plot OR or RR instead of logOR and logRR with `plot_forest`
With `statsmodels.stats.meta_analysis` `effectsize_2proportions`, we get the log odds ratio or log risk ratio when use the corresponding statistic option, and we can get the OR and RR, as well as their corresponding CI, by using `exp`
`np.exp(re... | good idea
Just changing the plot would only be one line (or 3 total)
(I just saw that we don't specify a plot title. That seems to be currently up to the user.
AFAICS, the plot doesn't specify which effect size is used.)
What would be a good name for an option in `plot_forest`?
`use_exp=False`
anti-log or reve... | 2021-10-01T15:00:29Z | 0.13dev | [
"statsmodels/stats/tests/test_meta.py::TestEffSmdMeta::test_smd",
"statsmodels/stats/tests/test_meta.py::TestMetaK1::test_tau_kacker",
"statsmodels/stats/tests/test_meta.py::TestMetaK1::test_pm",
"statsmodels/stats/tests/test_meta.py::TestMetaK1::test_dl",
"statsmodels/stats/tests/test_meta.py::TestEffectsi... | [
"statsmodels/stats/tests/test_meta.py::TestMetaBinOR::test_plot"
] | Python | [] | [] |
statsmodels/statsmodels | 7,791 | statsmodels__statsmodels-7791 | [
"7790"
] | a5ec3cb3e1114e7b10540683b621fdc402382e85 | diff --git a/statsmodels/tsa/holtwinters/model.py b/statsmodels/tsa/holtwinters/model.py
--- a/statsmodels/tsa/holtwinters/model.py
+++ b/statsmodels/tsa/holtwinters/model.py
@@ -496,7 +496,7 @@ def predict(self, params, start=None, end=None):
if start is None:
freq = getattr(self._index, "freq", ... | diff --git a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
--- a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
+++ b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
@@ -1025,6 +1025,38 @@ def test_damping_trend_zero():
assert_allclose(pr... | BUG: incorrect HW predictions
Holt's model makes incorrect predictions for some types of inputs
```python
import pandas as pd
from statsmodels.tsa.holtwinters import Holt
# same inputs with two different types of freq (int and datetime)
array_input = [10, 20, 30, 40, 50]
pd_series_input = pd.Series([10, 20, 3... | 2021-10-11T12:04:06Z | 0.13dev | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_holt_damp_r",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_predict",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_hw_seasonal",
"statsmodels/tsa/holtwinters/tests/tes... | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_different_inputs"
] | Python | [] | [] | |
statsmodels/statsmodels | 7,795 | statsmodels__statsmodels-7795 | [
"7794"
] | a5ec3cb3e1114e7b10540683b621fdc402382e85 | diff --git a/statsmodels/tsa/stattools.py b/statsmodels/tsa/stattools.py
--- a/statsmodels/tsa/stattools.py
+++ b/statsmodels/tsa/stattools.py
@@ -5,9 +5,10 @@
from statsmodels.compat.numpy import lstsq
from statsmodels.compat.pandas import deprecate_kwarg
-from statsmodels.compat.python import lzip
+from statsmode... | diff --git a/statsmodels/tsa/tests/test_stattools.py b/statsmodels/tsa/tests/test_stattools.py
--- a/statsmodels/tsa/tests/test_stattools.py
+++ b/statsmodels/tsa/tests/test_stattools.py
@@ -17,6 +17,7 @@
import pandas as pd
from pandas import DataFrame, Series, date_range
import pytest
+from scipy.interpolate impor... | Statsmodels 0.13 statsmodels.tsa.stattools.kpss nlags=None behavior
#### Describe the bug
The default nlags for kpss was changed from None to "auto" in 0.13 (commit https://github.com/statsmodels/statsmodels/commit/3d6c3884b9804842ff039c8c5d63a9ccf519867a). This has 2 problems:
1. The docstring still says that nl... | Thanks. The `None` options should have been removed.
| 2021-10-13T09:16:27Z | 0.13dev | [
"statsmodels/tsa/tests/test_stattools.py::TestZivotAndrews::test_gnpdef_case",
"statsmodels/tsa/tests/test_stattools.py::TestZivotAndrews::test_stkprc_case",
"statsmodels/tsa/tests/test_stattools.py::TestZivotAndrews::test_fail_regression_type",
"statsmodels/tsa/tests/test_stattools.py::TestZivotAndrews::test... | [
"statsmodels/tsa/tests/test_stattools.py::TestKPSS::test_none"
] | Python | [] | [] |
statsmodels/statsmodels | 7,998 | statsmodels__statsmodels-7998 | [
"7985"
] | a0b2bef5b2555c70a87785d8bac5c869e511e12a | diff --git a/statsmodels/distributions/copula/transforms.py b/statsmodels/distributions/copula/transforms.py
--- a/statsmodels/distributions/copula/transforms.py
+++ b/statsmodels/distributions/copula/transforms.py
@@ -8,6 +8,7 @@
License: BSD-3
"""
+import warnings
import numpy as np
from scipy.special import ... | diff --git a/statsmodels/distributions/tests/test_bernstein.py b/statsmodels/distributions/tests/test_bernstein.py
--- a/statsmodels/distributions/tests/test_bernstein.py
+++ b/statsmodels/distributions/tests/test_bernstein.py
@@ -21,6 +21,9 @@
def test_bernstein_distribution_1d():
grid = dt._Grid([501])
+ l... | proportion_confint inaccurate for method="binom_test"
There is a symmetry for binomial proportion confidence interval therefore following property should holds (approximately):
proportion_confint(count, nobs, method="binom_test")[0] + proportion_confint(nobs-count, nobs, method="binom_test")[1] ==1.0
but for some cas... | Thanks for reporting
I can confirm this, but don't see any obvious problem.
It's either because of some discreteness in scipy.stats.binom_test or in scipy.optimize.brentq.
The differences in the confint are nontrivial, but inverting binom_test is not one of the recommended confints (both in the literature and in t... | 2022-01-07T15:18:48Z | 0.13dev | [
"statsmodels/stats/tests/test_proportion.py::TestProportion::test_proptest",
"statsmodels/stats/tests/test_proportion.py::TestProportion::test_pairwiseproptest",
"statsmodels/stats/tests/test_proportion.py::TestProportion::test_number_pairs_1493",
"statsmodels/stats/tests/test_proportion.py::TestProportion::t... | [
"statsmodels/stats/tests/test_proportion.py::test_ci_symmetry_binom_test[count12-47]",
"statsmodels/stats/tests/test_proportion.py::test_ci_symmetry_binom_test[count24-47]",
"statsmodels/stats/tests/test_proportion.py::test_ci_symmetry_binom_test[count29-50]",
"statsmodels/stats/tests/test_proportion.py::test... | Python | [] | [] |
statsmodels/statsmodels | 8,006 | statsmodels__statsmodels-8006 | [
"7981"
] | 66ecf2ed6716ade72349d49a6ebd74e0c57e8d93 | diff --git a/statsmodels/tools/typing.py b/statsmodels/tools/typing.py
new file mode 100644
--- /dev/null
+++ b/statsmodels/tools/typing.py
@@ -0,0 +1,12 @@
+from __future__ import annotations
+
+from typing import Sequence, Union
+
+import numpy as np
+from pandas import DataFrame, Series
+
+ArrayLike1D = Union[Sequen... | diff --git a/statsmodels/tsa/tests/test_ar.py b/statsmodels/tsa/tests/test_ar.py
--- a/statsmodels/tsa/tests/test_ar.py
+++ b/statsmodels/tsa/tests/test_ar.py
@@ -18,7 +18,11 @@
from statsmodels.regression.linear_model import OLS
from statsmodels.tools.sm_exceptions import SpecificationWarning, ValueWarning
from sta... | Question: How to apply AutoReg results to new data / help with AutoReg `initialize`
Hello, first thanks for great job.
I have a question. It's not feature request nor bug.
What i want to do with autoreg
- I want to be able to just update model instead of new fit (lets call it partial fit or incremental learning... | +1, I'm coming here with the same question from `sktime`, from this issue: https://github.com/alan-turing-institute/sktime/issues/1788
(what do we put in `update` of the forecaster if `update_params=False`)
I think it might not be possible, looking at the docs, but I'm not sure.
Having the functionality in `statem... | 2022-01-10T13:47:01Z | 0.13dev | [
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_pvalues",
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_llf",
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_params",
"statsmodels/tsa/tests/test_ar.py::TestAutoRegOLSConstant::test_summary",
"statsmodels/tsa/... | [
"statsmodels/tsa/tests/test_ar.py::test_autoreg_apply[AR:",
"statsmodels/tsa/tests/test_ar.py::test_autoreg_apply_exception"
] | Python | [] | [] |
statsmodels/statsmodels | 8,047 | statsmodels__statsmodels-8047 | [
"8046"
] | b52f0b1e4aadaf21395db7c1c73d36311a11dc0a | diff --git a/statsmodels/nonparametric/smoothers_lowess.py b/statsmodels/nonparametric/smoothers_lowess.py
--- a/statsmodels/nonparametric/smoothers_lowess.py
+++ b/statsmodels/nonparametric/smoothers_lowess.py
@@ -234,7 +234,7 @@ def lowess(endog, exog, frac=2.0/3.0, it=3, delta=0.0, xvals=None, is_sorted=Fal
... | diff --git a/statsmodels/nonparametric/tests/test_lowess.py b/statsmodels/nonparametric/tests/test_lowess.py
--- a/statsmodels/nonparametric/tests/test_lowess.py
+++ b/statsmodels/nonparametric/tests/test_lowess.py
@@ -12,13 +12,14 @@
import os
import numpy as np
-import pytest
from numpy.testing import (
- ass... | The xvals arg in smoothers_lowess gets ValueError
#### Describe the bug
xvals arg in statsmodels.nonparametric.smoothers_lowess.lowess gets ValueError
The function works fine when xvals=None, but raises this ValueError on any xval value, regardless what data type is supplied.
#### Code Sample, a copy-pastable exam... | Cast your array to floats.
| 2022-01-27T16:11:34Z | 0.13dev | [
"statsmodels/nonparametric/tests/test_lowess.py::TestLowess::test_options",
"statsmodels/nonparametric/tests/test_lowess.py::TestLowess::test_import",
"statsmodels/nonparametric/tests/test_lowess.py::TestLowess::test_delta_rdef",
"statsmodels/nonparametric/tests/test_lowess.py::TestLowess::test_simple",
"st... | [
"statsmodels/nonparametric/tests/test_lowess.py::test_xvals_dtype"
] | Python | [] | [] |
statsmodels/statsmodels | 8,093 | statsmodels__statsmodels-8093 | [
"8049"
] | 2891644b53920fa2a1b451ff659ecfa90c2727c5 | diff --git a/statsmodels/stats/proportion.py b/statsmodels/stats/proportion.py
--- a/statsmodels/stats/proportion.py
+++ b/statsmodels/stats/proportion.py
@@ -1891,7 +1891,7 @@ def _std_2prop_power(diff, p2, ratio=1, alpha=0.05, value=0):
p2_alt = p2
p1_alt = p2_alt + diff
- std_null = _std_diff_prop(p1_... | diff --git a/statsmodels/stats/tests/test_proportion.py b/statsmodels/stats/tests/test_proportion.py
--- a/statsmodels/stats/tests/test_proportion.py
+++ b/statsmodels/stats/tests/test_proportion.py
@@ -915,6 +915,16 @@ def test_power_2indep():
alternative='two-sided')
... | Bug in /statsmodels/stats/proportion.py?
#### Describe the bug
In the `_std_2prop_power` function, when [calculating](https://github.com/statsmodels/statsmodels/blob/b722afa1ceb3b90df33491d64dfc319f9ab89a4a/statsmodels/stats/proportion.py#L1894) `std_null`, the parameter `ratio` (sample size ratio, nobs2 = ratio * n... | power_proportions_2indep doesn't propagate any keywords (although alpha and value are unused arguments in the function)
`p_pooled, std_null, std_alt = _std_2prop_power(diff, prop2, ratio=1,
alpha=0.05, value=0)`
`std_null = _std_diff_prop(p1_vnull, p2_vnull)`
... | 2022-02-01T21:01:16Z | 0.13dev | [
"statsmodels/stats/tests/test_proportion.py::test_proportion_effect_size",
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion_ndim[beta]",
"statsmodels/stats/tests/test_proportion.py::test_confint_multinomial_proportions_zeros",
"statsmodels/stats/tests/test_proportion.py::test_confint_propo... | [
"statsmodels/stats/tests/test_proportion.py::test_power_2indep"
] | Python | [] | [] |
statsmodels/statsmodels | 8,134 | statsmodels__statsmodels-8134 | [
"8133"
] | 63b4bd4cae3fcdd3b230e49bba09fb03111afe49 | diff --git a/statsmodels/iolib/summary.py b/statsmodels/iolib/summary.py
--- a/statsmodels/iolib/summary.py
+++ b/statsmodels/iolib/summary.py
@@ -764,6 +764,10 @@ def _repr_html_(self):
'''Display as HTML in IPython notebook.'''
return self.as_html()
+ def _repr_latex_(self):
+ '''Display... | diff --git a/statsmodels/iolib/tests/test_summary.py b/statsmodels/iolib/tests/test_summary.py
--- a/statsmodels/iolib/tests/test_summary.py
+++ b/statsmodels/iolib/tests/test_summary.py
@@ -5,8 +5,10 @@
import numpy as np # noqa: F401
import pytest
+from numpy.testing import assert_equal
from statsmodels.datas... | Displaying summary tables in LaTeX when converting Jupyter Notebooks to PDF via nbconvert
#### Is your feature request related to a problem? Please describe
There's currently no built-in method to display tables in LaTeX when converting Jupyter Notebooks to PDF via nbconvert. Output is a string in the converted PDF.
... | 2022-02-18T13:21:50Z | 0.13dev | [
"statsmodels/iolib/tests/test_summary.py::test_wrong_len_xname",
"statsmodels/iolib/tests/test_summary.py::test_escaped_variable_name",
"statsmodels/iolib/tests/test_summary2.py::test_summary_col_r2",
"statsmodels/iolib/tests/test_summary2.py::test_ols_summary_rsquared_label",
"statsmodels/iolib/tests/test_... | [
"statsmodels/iolib/tests/test_summary.py::TestSummaryLatex::test__repr_latex_",
"statsmodels/iolib/tests/test_summary2.py::TestSummaryLatex::test__repr_latex_",
"statsmodels/iolib/tests/test_table.py::TestSimpleTable::test__repr_latex"
] | Python | [] | [] | |
statsmodels/statsmodels | 8,137 | statsmodels__statsmodels-8137 | [
"8135"
] | 59a553e8102257a1f6c7bcd42e5fd1abd94c1c51 | diff --git a/statsmodels/stats/rates.py b/statsmodels/stats/rates.py
--- a/statsmodels/stats/rates.py
+++ b/statsmodels/stats/rates.py
@@ -7,6 +7,8 @@
import numpy as np
+import warnings
+
from scipy import stats
from statsmodels.stats.base import HolderTuple
@@ -57,7 +59,7 @@ def test_poisson_2indep(count1, e... | diff --git a/statsmodels/stats/tests/test_rates_poisson.py b/statsmodels/stats/tests/test_rates_poisson.py
--- a/statsmodels/stats/tests/test_rates_poisson.py
+++ b/statsmodels/stats/tests/test_rates_poisson.py
@@ -1,6 +1,8 @@
import pytest
+import warnings
+from numpy import arange
from numpy.testing import asse... | BUG: etest_poisson_2indep() not allowing custom ygrid
[The documentation](https://www.statsmodels.org/dev/generated/statsmodels.stats.rates.etest_poisson_2indep.html#statsmodels.stats.rates.etest_poisson_2indep) states that `ygrid` is a parameter we can supply to `etest_poisson_2indep`, but this is broken at the moment... | thanks for catching this
you could just do y_grid = ygrid in a new `else` part.
```
if ygrid is None:
...
else:
<needs some checking and asarray>
y_grid = ... ygrid
```
I thought of doing that just to make less code changes, but I think it's confusing to have both `ygrid` and `y_grid`. There is... | 2022-02-18T17:20:02Z | 0.13dev | [
"statsmodels/stats/tests/test_rates_poisson.py::test_alternative[case20]",
"statsmodels/stats/tests/test_rates_poisson.py::test_alternative[case7]",
"statsmodels/stats/tests/test_rates_poisson.py::test_alternative[case2]",
"statsmodels/stats/tests/test_rates_poisson.py::test_alternative[case11]",
"statsmode... | [
"statsmodels/stats/tests/test_rates_poisson.py::test_invalid_y_grid",
"statsmodels/stats/tests/test_rates_poisson.py::test_y_grid_regression"
] | Python | [] | [] |
statsmodels/statsmodels | 8,154 | statsmodels__statsmodels-8154 | [
"7985"
] | 7f65348146b1d9052548a0d1690ca4ead86e521e | diff --git a/statsmodels/stats/proportion.py b/statsmodels/stats/proportion.py
--- a/statsmodels/stats/proportion.py
+++ b/statsmodels/stats/proportion.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
-"""Tests and Confidence Intervals for Binomial Proportions
+"""
+Tests and Confidence Intervals for Binomial Proportions
... | diff --git a/statsmodels/stats/tests/test_proportion.py b/statsmodels/stats/tests/test_proportion.py
--- a/statsmodels/stats/tests/test_proportion.py
+++ b/statsmodels/stats/tests/test_proportion.py
@@ -29,6 +29,7 @@
)
from statsmodels.tools.sm_exceptions import HypothesisTestWarning
from statsmodels.tools.testing i... | proportion_confint inaccurate for method="binom_test"
There is a symmetry for binomial proportion confidence interval therefore following property should holds (approximately):
proportion_confint(count, nobs, method="binom_test")[0] + proportion_confint(nobs-count, nobs, method="binom_test")[1] ==1.0
but for some cas... | Thanks for reporting
I can confirm this, but don't see any obvious problem.
It's either because of some discreteness in scipy.stats.binom_test or in scipy.optimize.brentq.
The differences in the confint are nontrivial, but inverting binom_test is not one of the recommended confints (both in the literature and in t... | 2022-02-25T19:13:12Z | 0.13dev | [
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion_ndim[agresti_coull]",
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion[normal-case1]",
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion[jeffreys-case2]",
"statsmodels/stats/tests/test_proportion.py::te... | [
"statsmodels/stats/tests/test_proportion.py::test_ci_symmetry_binom_test[True-count27-50]",
"statsmodels/stats/tests/test_proportion.py::test_ci_symmetry_binom_test[True-count19-50]",
"statsmodels/stats/tests/test_proportion.py::test_ci_symmetry_binom_test[True-count20-50]",
"statsmodels/stats/tests/test_prop... | Python | [] | [] |
statsmodels/statsmodels | 8,339 | statsmodels__statsmodels-8339 | [
"8338"
] | 35b803767bd7803ca5f9fc35d4546aa8cb7be844 | diff --git a/statsmodels/stats/diagnostic.py b/statsmodels/stats/diagnostic.py
--- a/statsmodels/stats/diagnostic.py
+++ b/statsmodels/stats/diagnostic.py
@@ -399,23 +399,6 @@ def acorr_ljungbox(x, lags=None, boxpierce=False, model_df=0, period=None,
lb_stat lb_pvalue
10 214.106992 1.827374e-40
... | diff --git a/statsmodels/stats/tests/test_diagnostic.py b/statsmodels/stats/tests/test_diagnostic.py
--- a/statsmodels/stats/tests/test_diagnostic.py
+++ b/statsmodels/stats/tests/test_diagnostic.py
@@ -1701,17 +1701,29 @@ def test_ljungbox_dof_adj():
assert np.all(res2.iloc[4:, 1] <= res1.iloc[4:, 1])
-def te... | auto_lag selection in acorr_ljungbox fails when there is no autocorrelation
#### Describe the bug
The `acorr_ljungbox` function has an `auto_lag` flag which determines the optimal lag for performing the Ljung-Box autocorrelations test. When there is no autocorrelation in the data, however, the function fails and ret... | 2022-07-07T01:40:51Z | 0.13 | [
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticGPandas::test_acorr_ljung_box_against_r",
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticGPandas::test_acorr_breusch_godfrey",
"statsmodels/stats/tests/test_diagnostic.py::TestDiagnosticGPandas::test_hac",
"statsmodels/stats/tests/test_dia... | [
"statsmodels/stats/tests/test_diagnostic.py::test_ljungbox_auto_lag_whitenoise"
] | Python | [] | [] | |
statsmodels/statsmodels | 8,371 | statsmodels__statsmodels-8371 | [
"8360"
] | edd843f0afb37b30cb503709e2d4ff4bc57f9c04 | diff --git a/statsmodels/genmod/families/family.py b/statsmodels/genmod/families/family.py
--- a/statsmodels/genmod/families/family.py
+++ b/statsmodels/genmod/families/family.py
@@ -8,6 +8,7 @@
import inspect
+import warnings
import numpy as np
from scipy import special, stats
@@ -1310,6 +1311,9 @@ class Nega... | diff --git a/statsmodels/discrete/tests/test_discrete.py b/statsmodels/discrete/tests/test_discrete.py
--- a/statsmodels/discrete/tests/test_discrete.py
+++ b/statsmodels/discrete/tests/test_discrete.py
@@ -1636,6 +1636,22 @@ def test_issue_341():
np.testing.assert_equal(res1.predict(x[None]).shape, (1,7))
+de... | ENH: GLM add warning if negbin parameter is default
I have seen several examples, e.g. on stackoverflow, where users do not set the GLM-negbin parameter.
I guess users often assume that the extra parameter is estimated.
A warning if the default parameter is used would be useful to reduce the risk that user misunder... | 2022-08-14T21:54:17Z | 0.13 | [
"statsmodels/discrete/tests/test_discrete.py::TestProbitPowell::test_llnull",
"statsmodels/discrete/tests/test_discrete.py::TestProbitPowell::test_fit_regularized_invalid_method",
"statsmodels/discrete/tests/test_discrete.py::TestProbitPowell::test_bic",
"statsmodels/discrete/tests/test_discrete.py::TestProbi... | [
"statsmodels/discrete/tests/test_discrete.py::test_negative_binomial_default_alpha_param"
] | Python | [] | [] | |
statsmodels/statsmodels | 8,537 | statsmodels__statsmodels-8537 | [
"8471"
] | e544656a2d0ab4ff33f30deca118d8366be16cb8 | diff --git a/statsmodels/tsa/stattools.py b/statsmodels/tsa/stattools.py
--- a/statsmodels/tsa/stattools.py
+++ b/statsmodels/tsa/stattools.py
@@ -268,6 +268,9 @@ def adfuller(
store = bool_like(store, "store")
regresults = bool_like(regresults, "regresults")
+ if x.max() == x.min():
+ raise Value... | diff --git a/statsmodels/tsa/tests/test_stattools.py b/statsmodels/tsa/tests/test_stattools.py
--- a/statsmodels/tsa/tests/test_stattools.py
+++ b/statsmodels/tsa/tests/test_stattools.py
@@ -188,6 +188,12 @@ def test_store_str(self):
)
+@pytest.mark.parametrize("x", [np.full(8, 5.0)])
+def test_adfuller_re... | DIckey Fuller test breaks on constant values
#### Describe the bug
Dickey-Fuller test gives error when testing with constant values.
#### Code Sample, a copy-pastable example if possible
```python
adfuller(np.full(8, 5.0))
```
`RuntimeWarning: divide by zero encountered in log
llf = -nobs2*np.log(2*np.... | The test isn't well defined if the residual variance is 0. Ideally this would be caught and a meaningful exception raised. | 2022-11-24T17:33:37Z | 0.13 | [
"statsmodels/tsa/tests/test_stattools.py::TestADFConstant::test_teststat",
"statsmodels/tsa/tests/test_stattools.py::TestADFConstant::test_critvalues",
"statsmodels/tsa/tests/test_stattools.py::TestADFConstant::test_pvalue",
"statsmodels/tsa/tests/test_stattools.py::TestRUR::test_pval",
"statsmodels/tsa/tes... | [
"statsmodels/tsa/tests/test_stattools.py::test_adfuller_resid_variance_zero[x0]"
] | Python | [] | [] |
statsmodels/statsmodels | 8,567 | statsmodels__statsmodels-8567 | [
"8363"
] | 8fb709818984e9ddade22b72f9ed5cea561c38f2 | diff --git a/statsmodels/regression/linear_model.py b/statsmodels/regression/linear_model.py
--- a/statsmodels/regression/linear_model.py
+++ b/statsmodels/regression/linear_model.py
@@ -49,7 +49,10 @@
# need import in module instead of lazily to copy `__doc__`
from statsmodels.regression._prediction import Predictio... | diff --git a/statsmodels/tsa/tests/test_stattools.py b/statsmodels/tsa/tests/test_stattools.py
--- a/statsmodels/tsa/tests/test_stattools.py
+++ b/statsmodels/tsa/tests/test_stattools.py
@@ -25,6 +25,7 @@
InfeasibleTestError,
InterpolationWarning,
MissingDataError,
+ ValueWarning,
)
# Remove imports... | PACF Fails When Matrix for Yule-Walker Equations is Singular
When we try to use the `pacf` function and the matrix for the Yule-Walker equations is singular, we get a [`LinAlgError`](https://numpy.org/doc/stable/reference/generated/numpy.linalg.LinAlgError.html) and the code fails. This also leads to downstream failur... | 2022-12-08T18:48:34Z | 0.13 | [
"statsmodels/tsa/tests/test_stattools.py::TestADFConstant::test_teststat",
"statsmodels/tsa/tests/test_stattools.py::TestADFConstant::test_pvalue",
"statsmodels/tsa/tests/test_stattools.py::TestADFConstant::test_critvalues",
"statsmodels/tsa/tests/test_stattools.py::TestACF::test_qstat",
"statsmodels/tsa/te... | [
"statsmodels/tsa/tests/test_stattools.py::TestPACF::test_yw_singular"
] | Python | [] | [] | |
statsmodels/statsmodels | 8,569 | statsmodels__statsmodels-8569 | [
"1880"
] | edfcbbd542c3206d27d903f9b8f0c42c4231dc97 | diff --git a/statsmodels/discrete/discrete_model.py b/statsmodels/discrete/discrete_model.py
--- a/statsmodels/discrete/discrete_model.py
+++ b/statsmodels/discrete/discrete_model.py
@@ -2594,7 +2594,7 @@ class Probit(BinaryModel):
@cache_readonly
def link(self):
from statsmodels.genmod.families impo... | diff --git a/statsmodels/discrete/tests/test_predict.py b/statsmodels/discrete/tests/test_predict.py
--- a/statsmodels/discrete/tests/test_predict.py
+++ b/statsmodels/discrete/tests/test_predict.py
@@ -385,7 +385,7 @@ def test_distr(case):
if cls_model in models_influ:
with warnings.catch_warnings():
... | ENH: family: add option to turn of valid link check, or warn.
see #1509
add option: `invalid_link : string in ['raise' 'warn', 'ignore']` to turn exception into warning or ignore
needed to allow the GLM equivalent for Probit in #1870
#1509 also includes other options to improve how links are specified, that are no... | @kshedden This will also change which links can be used in GEE by turning off the exception.
test failure in GEE Multinomial (I only ran test_glm.py locally)
```
======================================================================
ERROR: statsmodels.genmod.tests.test_gee.TestGEE.test_nominal
-------------------... | 2022-12-08T22:15:25Z | 0.13 | [
"statsmodels/genmod/tests/test_gee_glm.py::TestComparePoisson::test_resid",
"statsmodels/genmod/tests/test_gee_glm.py::TestComparePoisson::test_basic",
"statsmodels/genmod/tests/test_gee_glm.py::TestCompareLogit::test_resid",
"statsmodels/genmod/tests/test_gee_glm.py::TestCompareLogit::test_basic",
"statsmo... | [
"statsmodels/genmod/families/tests/test_family.py::test_family_link_check[Binomial-links3]",
"statsmodels/genmod/families/tests/test_family.py::test_family_link_check[Gaussian-links1]",
"statsmodels/genmod/families/tests/test_family.py::test_family_link_check[Gamma-links2]",
"statsmodels/genmod/families/tests... | Python | [] | [] |
statsmodels/statsmodels | 8,623 | statsmodels__statsmodels-8623 | [
"8619"
] | 74bd3d6af477d396c54c82e525837156ca1a7ada | diff --git a/statsmodels/stats/multitest.py b/statsmodels/stats/multitest.py
--- a/statsmodels/stats/multitest.py
+++ b/statsmodels/stats/multitest.py
@@ -60,7 +60,9 @@ def _ecdf(x):
for a in m[1:]:
multitest_alias[a] = m[0]
-def multipletests(pvals, alpha=0.05, method='hs', is_sorted=False,
+def multip... | diff --git a/statsmodels/stats/tests/test_multi.py b/statsmodels/stats/tests/test_multi.py
--- a/statsmodels/stats/tests/test_multi.py
+++ b/statsmodels/stats/tests/test_multi.py
@@ -326,6 +326,75 @@ def test_fdr_bky():
assert_almost_equal([0.047619, 0.0649], res_tst[-1][:2], 3)
assert_equal(8, res_tst[0].sum... | BUG: statsmodels.stats.multitest.fdrcorrection_twostage sometimes returns values in wrong order and gives values above 1
test case:
```
>>> import statsmodels.stats.multitest
>>> import numpy as np
>>> test=np.array([0.2, 0.8, 0.3, 0.5, 1])
>>> statsmodels.stats.multitest.fdrcorrection_twostage(test, alpha=0.05, m... | Thanks for reporting.
Looks like a bug, but it's not clear to me yet why. It has the same rearranging code like fdrcorrection and multipletests.
if there is one rejection, then it seems to work
```
test=np.array([0.2, 0.8, 0.3, 0.5, 0.9, 1e-3])
res1 = statsmodels.stats.multitest.fdrcorrection_twostage(test, ... | 2023-01-19T17:57:21Z | 0.13 | [
"statsmodels/stats/tests/test_multi.py::TestMultiTests3::test_multi_pvalcorrection_rmethods[SidakSS-val6]",
"statsmodels/stats/tests/test_multi.py::TestMultiTests3::test_multi_pvalcorrection",
"statsmodels/stats/tests/test_multi.py::TestMultiTests3::test_multi_pvalcorrection_rmethods[BH-val0]",
"statsmodels/s... | [
"statsmodels/stats/tests/test_multi.py::test_fdr_bky",
"statsmodels/stats/tests/test_multi.py::test_fdr_twostage"
] | Python | [] | [] |
statsmodels/statsmodels | 8,648 | statsmodels__statsmodels-8648 | [
"8641"
] | 6d5f7461e7e25456fd38f032d3028945f5a54a82 | diff --git a/statsmodels/discrete/count_model.py b/statsmodels/discrete/count_model.py
--- a/statsmodels/discrete/count_model.py
+++ b/statsmodels/discrete/count_model.py
@@ -369,7 +369,7 @@ def hessian(self, params):
def predict(self, params, exog=None, exog_infl=None, exposure=None,
offset=None,... | diff --git a/statsmodels/stats/tests/test_power.py b/statsmodels/stats/tests/test_power.py
--- a/statsmodels/stats/tests/test_power.py
+++ b/statsmodels/stats/tests/test_power.py
@@ -688,6 +688,19 @@ def setup_class(cls):
# precision for test_power
cls.decimal = 5
+ def test_kwargs(self):
+
+ ... | Incorrect comment character in R code
#### Describe the bug
The R script [CH.r](https://github.com/statsmodels/statsmodels/blob/main/statsmodels/stats/libqsturng/CH.r) appears to use `%` as a comment character rather than `#`. This invalid R code is problematic when also using [`renv`](https://rstudio.github.io/ren... | 2023-02-03T18:15:27Z | 0.13 | [
"statsmodels/stats/tests/test_power.py::TestTTPowerOneS6::test_power",
"statsmodels/stats/tests/test_power.py::TestTTPowerOneS6::test_positional",
"statsmodels/stats/tests/test_power.py::TestTTPowerOneS6::test_power_plot",
"statsmodels/stats/tests/test_power.py::TestTTPowerOneS6::test_roots",
"statsmodels/s... | [
"statsmodels/stats/tests/test_power.py::TestFtestPower::test_kwargs"
] | Python | [] | [] | |
statsmodels/statsmodels | 8,664 | statsmodels__statsmodels-8664 | [
"8663"
] | e144c6a8b8de3ee17e814bbb8962cdb890b66901 | diff --git a/statsmodels/iolib/summary2.py b/statsmodels/iolib/summary2.py
--- a/statsmodels/iolib/summary2.py
+++ b/statsmodels/iolib/summary2.py
@@ -103,7 +103,7 @@ def add_dict(self, d, ncols=2, align='l', float_format="%.4f"):
def add_text(self, string):
"""Append a note to the bottom of the summary... | diff --git a/statsmodels/iolib/tests/test_summary2.py b/statsmodels/iolib/tests/test_summary2.py
--- a/statsmodels/iolib/tests/test_summary2.py
+++ b/statsmodels/iolib/tests/test_summary2.py
@@ -33,6 +33,8 @@ def test_summarycol(self):
\end{tabular}
\end{center}
\end{table}
+\bigskip
+Standard errors in parentheses.... | BUG: summary2 output does not include extra_text
random OLS model
```
model1.summary2().extra_txt
[]
model1.summary().extra_txt
'Notes:\n[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.'
```
If there is an extra text as in `summary_col`, then it is not included in... | This looks like an issue of `RegressionResults`, a class in `regression.linear_model`.
The method `summary2` creates an instance of `iolib.summary2.Summary` but does not provide the variable `etext` that is provided when the analogous `summary.Summary` is called by `summary`.
I guess that `summary2.Summary` is wo... | 2023-02-10T23:17:33Z | 0.13 | [
"statsmodels/iolib/tests/test_summary2.py::TestSummaryLabels::test_summary_col_r2",
"statsmodels/iolib/tests/test_summary2.py::TestSummaryLabels::test_absence_of_r2",
"statsmodels/iolib/tests/test_summary2.py::test_ols_summary_rsquared_label",
"statsmodels/iolib/tests/test_summary2.py::TestSummaryLatex::test_... | [
"statsmodels/iolib/tests/test_summary2.py::TestSummaryLatex::test_summarycol",
"statsmodels/iolib/tests/test_summary2.py::TestSummaryLatex::test__repr_latex_"
] | Python | [] | [] |
statsmodels/statsmodels | 8,669 | statsmodels__statsmodels-8669 | [
"8665"
] | ef9cf3ad5bf73c84027421ff5595647f0fefb32b | diff --git a/statsmodels/discrete/discrete_model.py b/statsmodels/discrete/discrete_model.py
--- a/statsmodels/discrete/discrete_model.py
+++ b/statsmodels/discrete/discrete_model.py
@@ -213,7 +213,7 @@ def pdf(self, X):
def _check_perfect_pred(self, params, *args):
endog = self.endog
- fittedval... | diff --git a/statsmodels/discrete/tests/test_discrete.py b/statsmodels/discrete/tests/test_discrete.py
--- a/statsmodels/discrete/tests/test_discrete.py
+++ b/statsmodels/discrete/tests/test_discrete.py
@@ -1552,6 +1552,19 @@ def setup_class(cls):
cls.res2 = res2
+def test_mnlogit_basinhopping():
+ def ... | BUG: MNLogit fit breaks with basinhopping optimizer because of callback
https://stackoverflow.com/questions/75417415/basinhopping-causes-error-with-statsmodels-mnlogit
I can replicate the example
Problem is that callback is defined in the MNLogit.fit function and the keyword argument is ignored. That callback is ... | minimal fix is to change in fit method
```
if callback is None:
callback = lambda *x : None
```
But I guess we don't need the callback if we don't call `super().fit` method of either Binary or Discrete Model.
The underlying problem is that scipy.optimize fmin_bfgs (and I guess others) has 1 arg ... | 2023-02-13T16:37:36Z | 0.13 | [
"statsmodels/discrete/tests/test_discrete.py::TestL1AlphaZeroMNLogit::test_basic_results",
"statsmodels/discrete/tests/test_discrete.py::TestNegativeBinomialNB2Null::test_llnull",
"statsmodels/discrete/tests/test_discrete.py::TestNegativeBinomialNBP2Null::test_start_null",
"statsmodels/discrete/tests/test_dis... | [
"statsmodels/discrete/tests/test_discrete.py::test_mnlogit_basinhopping"
] | Python | [] | [] |
statsmodels/statsmodels | 8,674 | statsmodels__statsmodels-8674 | [
"8672"
] | d4fee3c81029f10d24c9b021e5df01c5f0a445dd | diff --git a/statsmodels/discrete/discrete_model.py b/statsmodels/discrete/discrete_model.py
--- a/statsmodels/discrete/discrete_model.py
+++ b/statsmodels/discrete/discrete_model.py
@@ -136,11 +136,13 @@ def _pandas_to_dummies(endog):
if endog.shape[1] == 1:
yname = endog.columns[0]
... | diff --git a/statsmodels/discrete/tests/test_discrete.py b/statsmodels/discrete/tests/test_discrete.py
--- a/statsmodels/discrete/tests/test_discrete.py
+++ b/statsmodels/discrete/tests/test_discrete.py
@@ -1706,6 +1706,10 @@ def test_mnlogit_factor():
params = res.params
summary = res.summary()
predicte... | BUG: Init of MNLogit fails if endogenous variable is unnamed Pandas Series
#### Describe the bug
MNLogit throws a "TypeError: MultiIndex.name must be a hashable type" if the provided endogenous variable is a pandas Series whose `name` attribute is not set. The resulting stack trace is quite cryptic which makes it ve... | Thanks for reporting this.
It's a bug.
But I don't know why it didn't show up in the past. That code should be unchanged for some time.
My guess is that somewhere in the datahandling there is no default yname "y" if there is no name provided.
This should be MNLogit or MultinomialModel specifc because models li... | 2023-02-15T16:16:01Z | 0.13 | [
"statsmodels/discrete/tests/test_discrete.py::TestProbitMinimizeDogleg::test_resid_dev",
"statsmodels/discrete/tests/test_discrete.py::TestProbitMinimizeDogleg::test_resid_generalized",
"statsmodels/discrete/tests/test_discrete.py::TestProbitMinimizeDogleg::test_pvalues",
"statsmodels/discrete/tests/test_disc... | [
"statsmodels/discrete/tests/test_discrete.py::test_mnlogit_factor"
] | Python | [] | [] |
statsmodels/statsmodels | 8,702 | statsmodels__statsmodels-8702 | [
"8704"
] | 27b28335f5921accbbda5f8ea6f0bc1768db282a | diff --git a/statsmodels/regression/linear_model.py b/statsmodels/regression/linear_model.py
--- a/statsmodels/regression/linear_model.py
+++ b/statsmodels/regression/linear_model.py
@@ -2429,7 +2429,7 @@ def get_robustcov_results(self, cov_type='HC1', use_t=None, **kwargs):
- 'HAC': heteroskedasticity-autoc... | diff --git a/statsmodels/stats/tests/test_proportion.py b/statsmodels/stats/tests/test_proportion.py
--- a/statsmodels/stats/tests/test_proportion.py
+++ b/statsmodels/stats/tests/test_proportion.py
@@ -98,6 +98,12 @@ def test_confint_proportion_ndim(method):
method=method)
assert... | BUG: test_proportions_2indep, hard coded correction=True for score diff test
Why is this hard coded and does not use to `correction` option?
`correction = True` inside the path for score method for default compare="diff"
Is this a bug or intentional? I don't remember
| 2023-02-24T21:37:17Z | 0.13 | [
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion[wilson-case4]",
"statsmodels/stats/tests/test_proportion.py::test_multinomial_proportions_errors",
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion[agresti_coull-case6]",
"statsmodels/stats/tests/test_proportion.py::test_... | [
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion_ndim[jeffreys]",
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion_ndim[wilson]",
"statsmodels/stats/tests/test_proportion.py::test_confint_proportion_ndim[beta]",
"statsmodels/stats/tests/test_proportion.py::test_confint_... | Python | [] | [] | |
statsmodels/statsmodels | 8,735 | statsmodels__statsmodels-8735 | [
"8726",
"8729"
] | a948e8dee9e99a08f249f67ca2ac5df68fea835b | diff --git a/statsmodels/base/model.py b/statsmodels/base/model.py
--- a/statsmodels/base/model.py
+++ b/statsmodels/base/model.py
@@ -1097,6 +1097,7 @@ def _transform_predict_exog(self, exog, transform=True):
else:
# assume we need a row
exog = pd.DataFrame(ex... | diff --git a/statsmodels/multivariate/tests/test_manova.py b/statsmodels/multivariate/tests/test_manova.py
--- a/statsmodels/multivariate/tests/test_manova.py
+++ b/statsmodels/multivariate/tests/test_manova.py
@@ -3,7 +3,7 @@
import numpy as np
import pandas as pd
import pytest
-from numpy.testing import assert_alm... | BUG: out-of-sample prediction with nan values get unexpected result
This is an OLS regression model from [this page](https://www.statsmodels.org/stable/example_formulas.html):
```
import statsmodels.api as sm
import statsmodels.formula.api as smf
import numpy as np
import pandas as pd
# example from https://www... | 2023-03-16T21:31:45Z | 0.13 | [
"statsmodels/multivariate/tests/test_manova.py::test_manova_no_formula",
"statsmodels/multivariate/tests/test_manova.py::test_manova_no_formula_no_hypothesis",
"statsmodels/multivariate/tests/test_manova.py::test_manova_sas_example",
"statsmodels/multivariate/tests/test_manova.py::test_manova_test_input_valid... | [
"statsmodels/multivariate/tests/test_manova.py::test_manova_demeaned"
] | Python | [] | [] | |
statsmodels/statsmodels | 8,780 | statsmodels__statsmodels-8780 | [
"8779"
] | 4273c0d426772e6845de6301b30f6138d6c3e290 | diff --git a/statsmodels/discrete/count_model.py b/statsmodels/discrete/count_model.py
--- a/statsmodels/discrete/count_model.py
+++ b/statsmodels/discrete/count_model.py
@@ -727,7 +727,8 @@ def get_distribution(self, params, exog=None, exog_infl=None,
w = self.predict(params, exog=exog, exog_infl=exog_infl,
... | diff --git a/statsmodels/discrete/tests/test_conditional.py b/statsmodels/discrete/tests/test_conditional.py
--- a/statsmodels/discrete/tests/test_conditional.py
+++ b/statsmodels/discrete/tests/test_conditional.py
@@ -20,12 +20,12 @@ def test_logit_1d():
for x in -1, 0, 1, 2:
params = np.r_[x, ]
... | BUG: BetaModel, df_xxx warning, and init kwargs
Simple example without specifying exog_precision produces a warning
`UserWarning: df_model + k_constant + k_extra differs from k_params`
Also, I misspelled exog_precision and did not get an exception. Silently ignored.
`__init__` does not check whether `kwargs` are v... | 2023-04-07T18:45:06Z | 0.13 | [
"statsmodels/genmod/tests/test_glm.py::TestTweedieLog15Fair::test_df",
"statsmodels/genmod/tests/test_glm.py::TestTweedieLog15Fair::test_summary",
"statsmodels/genmod/tests/test_glm.py::TestTweedieLog15Fair::test_fittedvalues",
"statsmodels/genmod/tests/test_glm.py::TestTweedieLog15Fair::test_resid",
"stats... | [
"statsmodels/genmod/tests/test_glm.py::TestGaussianLog::test_get_distribution",
"statsmodels/genmod/tests/test_glm.py::TestGlmPoisson::test_get_distribution",
"statsmodels/genmod/tests/test_glm.py::TestGlmPoissonOffset::test_get_distribution",
"statsmodels/genmod/tests/test_glm.py::TestGlmNegbinomial::test_ge... | Python | [] | [] | |
statsmodels/statsmodels | 8,801 | statsmodels__statsmodels-8801 | [
"8696"
] | c967ca06d96b3314891b81b6839ebad5730a540f | diff --git a/statsmodels/robust/norms.py b/statsmodels/robust/norms.py
--- a/statsmodels/robust/norms.py
+++ b/statsmodels/robust/norms.py
@@ -3,6 +3,16 @@
# TODO: add plots to weighting functions for online docs.
+def _cabs(x):
+ """absolute value function that changes complex sign based on real sign
+
+ Th... | diff --git a/statsmodels/robust/tests/results/results_norms.py b/statsmodels/robust/tests/results/results_norms.py
new file mode 100644
--- /dev/null
+++ b/statsmodels/robust/tests/results/results_norms.py
@@ -0,0 +1,33 @@
+
+
+from statsmodels.tools.testing import Holder
+
+res_hampel = Holder(
+ rho=[7.5, 6.833333... | BUG: incorrect definition of piecewise boolean indicator array in `Hampel.rho` (*robust* module)
#### Describe the bug
There is a bug in `class Hampel` within [statsmodels/robust/norms.py](https://github.com/statsmodels/statsmodels/blob/main/statsmodels/robust/norms.py) in defining piecewise function over `z` in `Ha... | Note that this affects the same line of code as in #8697 but a different problem is raised in this BUG issue. | 2023-04-15T14:00:11Z | 0.14 | [
"statsmodels/robust/tests/test_norms.py::test_norms_consistent[case0]",
"statsmodels/robust/tests/test_norms.py::test_norm[case2-complex128]",
"statsmodels/robust/tests/test_norms.py::test_norms_consistent[case3]"
] | [
"statsmodels/robust/tests/test_norms.py::test_norm[case2-int]",
"statsmodels/robust/tests/test_norms.py::test_norm[case0-int]",
"statsmodels/robust/tests/test_norms.py::test_norm[case1-int]",
"statsmodels/robust/tests/test_norms.py::test_norms_consistent[case1]",
"statsmodels/robust/tests/test_norms.py::tes... | Python | [] | [] |
statsmodels/statsmodels | 8,828 | statsmodels__statsmodels-8828 | [
"8438"
] | 3e739c26729e2c844394f5918846e2897ad0f871 | diff --git a/statsmodels/tsa/forecasting/theta.py b/statsmodels/tsa/forecasting/theta.py
--- a/statsmodels/tsa/forecasting/theta.py
+++ b/statsmodels/tsa/forecasting/theta.py
@@ -151,6 +151,8 @@ def __init__(
"model",
options=("auto", "additive", "multiplicative", "mul", "add"),
)
+ ... | diff --git a/statsmodels/tsa/forecasting/tests/test_theta.py b/statsmodels/tsa/forecasting/tests/test_theta.py
--- a/statsmodels/tsa/forecasting/tests/test_theta.py
+++ b/statsmodels/tsa/forecasting/tests/test_theta.py
@@ -133,3 +133,29 @@ def test_forecast_seasonal_alignment(data, period):
index = np.arange(data.... | Theta deseasonalizing multiplicative method not working
#### Describe the bug
When using the forecasting Theta model I found some strange behavior in the deseasonalizing of the data. There should be three deseasonalize methods: “auto”, “additive” and “multiplicative” (https://www.statsmodels.org/dev/generated/statsm... | Any updates? | 2023-04-24T08:51:18Z | 0.14 | [
"statsmodels/tsa/forecasting/tests/test_theta.py::test_smoke[type:",
"statsmodels/tsa/forecasting/tests/test_theta.py::test_forecast_seasonal_alignment[type:",
"statsmodels/tsa/forecasting/tests/test_theta.py::test_forecast_errors[type:",
"statsmodels/tsa/forecasting/tests/test_theta.py::test_alt_index[dateti... | [
"statsmodels/tsa/forecasting/tests/test_theta.py::test_auto"
] | Python | [] | [] |
statsmodels/statsmodels | 8,831 | statsmodels__statsmodels-8831 | [
"8634"
] | 3e739c26729e2c844394f5918846e2897ad0f871 | diff --git a/statsmodels/tsa/holtwinters/_smoothers.py b/statsmodels/tsa/holtwinters/_smoothers.py
--- a/statsmodels/tsa/holtwinters/_smoothers.py
+++ b/statsmodels/tsa/holtwinters/_smoothers.py
@@ -192,7 +192,7 @@ def holt_mul_dam(x, hw_args: HoltWintersArgs):
for i in range(1, hw_args.n):
lvl[i] = (y_al... | diff --git a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
--- a/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
+++ b/statsmodels/tsa/holtwinters/tests/test_holtwinters.py
@@ -43,6 +43,62 @@
SEASONALS = ("add", "mul", None)
TRENDS = ("add", "mul",... | initial_level doesn't appear to be respected in ExponentialSmoothing class
#### Describe the bug
[A clear and concise description of what the bug is. This should explain **why** the current behaviour is a problem and why the expected output is a better solution.]
#### Code Sample, a copy-pastable example if possi... | Thanks for the report. In the meantime, you might consider using `ETSModel` which is the most recent/supported exponential smoothing model. | 2023-04-24T11:33:50Z | 0.14 | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_ndarray",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_hw_seasonal_add_mul",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::TestHoltWinters::test_hw_seasonal",
"statsmodels/tsa/holtwinters/t... | [
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_initial_level",
"statsmodels/tsa/holtwinters/tests/test_holtwinters.py::test_all_initial_values"
] | Python | [] | [] |
statsmodels/statsmodels | 8,834 | statsmodels__statsmodels-8834 | [
"8628"
] | 4fee62a4633cfa8ec5db1909fbff5cae572e922e | diff --git a/statsmodels/discrete/discrete_model.py b/statsmodels/discrete/discrete_model.py
--- a/statsmodels/discrete/discrete_model.py
+++ b/statsmodels/discrete/discrete_model.py
@@ -522,7 +522,7 @@ def predict(self, params, exog=None, which="mean", linear=None,
"""
if linear is not None:
... | diff --git a/statsmodels/genmod/tests/test_glm.py b/statsmodels/genmod/tests/test_glm.py
--- a/statsmodels/genmod/tests/test_glm.py
+++ b/statsmodels/genmod/tests/test_glm.py
@@ -990,7 +990,7 @@ def test_predict(self):
# Check that offset shifts the linear predictor
mod3 = GLM(endog, exog, family=sm.f... | FAQ-D/MAINT Use FutureWarning instead of DeprecationWarning for user deprecation warning
(I'm late to the story, see pep-565 for python 3.7)
DeprecationWarnings are not displayed to users, e.g. don't show up in notebooks.
FutureWarnings are not silenced by default, and show up in notebooks.
Most of our deprecati... | 2023-04-25T09:11:10Z | 0.14 | [
"statsmodels/stats/tests/test_rates_poisson.py::TestMethodsCompar1samp::test_confint[score]",
"statsmodels/stats/tests/test_rates_poisson.py::TestMethodsCompar1samp::test_confint[sqrt-cent]",
"statsmodels/stats/tests/test_rates_poisson.py::TestMethodsCompar1samp::test_confint[exact-c]",
"statsmodels/stats/tes... | [
"statsmodels/stats/tests/test_rates_poisson.py::test_twosample_poisson",
"statsmodels/stats/tests/test_rates_poisson.py::test_invalid_y_grid",
"statsmodels/tsa/statespace/tests/test_simulation_smoothing.py::test_deprecated_arguments_univariate",
"statsmodels/tsa/statespace/tests/test_simulation_smoothing.py::... | Python | [] | [] | |
statsmodels/statsmodels | 8,835 | statsmodels__statsmodels-8835 | [
"8514"
] | 4fee62a4633cfa8ec5db1909fbff5cae572e922e | diff --git a/statsmodels/tsa/seasonal.py b/statsmodels/tsa/seasonal.py
--- a/statsmodels/tsa/seasonal.py
+++ b/statsmodels/tsa/seasonal.py
@@ -342,7 +342,7 @@ def plot(
else:
xlim = (0, self._observed.shape[0] - 1)
- fig, axs = plt.subplots(len(series), 1)
+ fig, axs = plt.subplots... | diff --git a/statsmodels/tsa/forecasting/tests/test_stl.py b/statsmodels/tsa/forecasting/tests/test_stl.py
--- a/statsmodels/tsa/forecasting/tests/test_stl.py
+++ b/statsmodels/tsa/forecasting/tests/test_stl.py
@@ -40,6 +40,16 @@ def test_smoke(data):
assert hasattr(res.model_result, "forecast")
+@pytest.mark.... | Use sharex=True in plotting seasonal decomposition
This is a tiny change in the `plot` method of `DecomposeResult` (in statsmodels.tsa.seasonal). I started to use it just a few minutes ago on a quite long time series (8760 samples), so that in a interactive Matlplotlib plot, it is useful to zoom horizontally. Unfortuna... | Is there an API call to disable it from an existing plot? If so, could you add a note that sharex is true by default. Axis synchronization can be disabled using ax.set_????
> Is there an API call to disable it from an existing plot?
Good question, I hadn't thought of this. It took me a little digging to follow the l... | 2023-04-25T09:24:24Z | 0.14 | [
"statsmodels/tsa/forecasting/tests/test_stl.py::test_exceptions",
"statsmodels/tsa/forecasting/tests/test_stl.py::test_equivalence_forecast[23-ETSModel]",
"statsmodels/tsa/forecasting/tests/test_stl.py::test_equivalence_forecast[7-ETSModel]",
"statsmodels/tsa/forecasting/tests/test_stl.py::test_equivalence_fo... | [
"statsmodels/tsa/forecasting/tests/test_stl.py::test_sharex"
] | Python | [] | [] |
statsmodels/statsmodels | 8,887 | statsmodels__statsmodels-8887 | [
"8879"
] | 12e0284e8eee9610f35a471749b6ea5c79e49a52 | diff --git a/statsmodels/stats/_adnorm.py b/statsmodels/stats/_adnorm.py
--- a/statsmodels/stats/_adnorm.py
+++ b/statsmodels/stats/_adnorm.py
@@ -5,6 +5,8 @@
Author: Josef Perktold and Scipy developers
License : BSD-3
"""
+import warnings
+
import numpy as np
from scipy import stats
@@ -64,8 +66,12 @@ def ander... | diff --git a/statsmodels/stats/tests/test_diagnostic.py b/statsmodels/stats/tests/test_diagnostic.py
--- a/statsmodels/stats/tests/test_diagnostic.py
+++ b/statsmodels/stats/tests/test_diagnostic.py
@@ -1957,3 +1957,43 @@ def test_small_skip(reset_randomstate):
# M2 + fit(M1)-exp(fit(M2)) < 2.22e-16 ***
# ---
# Sign... | Multi-dimensional indexing error in statsmodels.stats.diagnostic.linear_reset when using Pandas
#### Describe the bug
I tried to do a linear RESET test, but I got an error: `ValueError: Multi-dimensional indexing (e.g. `obj[:, None]`) is no longer supported. Convert to a numpy array before indexing instead.`
Comp... | looks like a bug with pandas compatibility
The function should use the unwrapped results instance internally.
`smdiag.linear_reset(OLS_results._results)` should have worked as workaround, however it breaks on the isinstance check.
So the only workaround I see right now (except for monkey patching fittedvalues)... | 2023-05-18T08:15:50Z | 0.14 | [
"statsmodels/stats/tests/test_diagnostic.py::test_gq",
"statsmodels/stats/tests/test_diagnostic.py::test_reset_smoke[cov1-True-fitted-2]",
"statsmodels/stats/tests/test_diagnostic.py::test_rainbow_smoke_order_by[order_by2-0.5]",
"statsmodels/stats/tests/test_diagnostic.py::test_rainbow_smoke_order_by[order_by... | [
"statsmodels/stats/tests/test_diagnostic.py::test_diagnostics_pandas"
] | Python | [] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.