Skip to content

@stdlib/stats-pcorrtest: missing pcorr key in pcorrtest Results type #1153

@andrefs

Description

@andrefs

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @stdlib/[email protected] for the project I'm working on.

The pcorrtest function returns an object. The examples in the README.md show that this object has a pcorr key with the value for the correlation coefficient. The implementation does indeed set the value for that key, but that key is missing from the Results type returned by pcorrtest.

Here is the diff that solved my problem:

diff --git a/node_modules/@stdlib/stats-pcorrtest/docs/types/index.d.ts b/node_modules/@stdlib/stats-pcorrtest/docs/types/index.d.ts
index c3ff1e4..260a66d 100644
--- a/node_modules/@stdlib/stats-pcorrtest/docs/types/index.d.ts
+++ b/node_modules/@stdlib/stats-pcorrtest/docs/types/index.d.ts
@@ -76,6 +76,11 @@ interface Results {
 	*/
 	nullValue: number;
 
+	/**
+	 * Correlation coefficient.
+	 */
+	pcorr: number;
+
 	/**
 	* Alternative hypothesis (`two-sided`, `less` or `greater`).
 	*/
@@ -117,7 +122,7 @@ interface Results {
 * var y = [ 3, 2, 4, 1, 2, 4 ];
 * var out = pcorrTest( x, y );
 */
-declare function pcorrTest( x: NumericArray, y: NumericArray, options?: Options ): Results; // tslint-disable-line max-line-length
+declare function pcorrTest(x: NumericArray, y: NumericArray, options?: Options): Results; // tslint-disable-line max-line-length
 
 
 // EXPORTS //

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working.StatisticsIssue or pull request related to statistical functionality.TypeScriptIssue involves or relates to TypeScript.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions