diff --git a/lib/node_modules/@stdlib/stats/base/dists/signrank/quantile/README.md b/lib/node_modules/@stdlib/stats/base/dists/signrank/quantile/README.md index 2912286f3869..1d4b48d63965 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/signrank/quantile/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/signrank/quantile/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2020 The Stdlib Authors. +Copyright (c) 2026 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -124,6 +124,103 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/signrank/quantile.h" +``` + +#### stdlib_base_dists_signrank_quantile( p, n ) + +Evaluates the quantile function of the Wilcoxon signed rank test statistic with `n` observations. + +```c +double out = stdlib_base_dists_signrank_quantile( 0.8, 5 ); +// returns 11.0 +``` + +The function accepts the following arguments: + +- **p**: `[in] double` probability value. +- **n**: `[in] int32_t` number of observations. + +```c +double stdlib_base_dists_signrank_quantile( const double p, const int32_t n ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/signrank/quantile.h" +#include "stdlib/math/base/special/ceil.h" +#include +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + int32_t n; + double p; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + p = random_uniform( 0.0, 1.0 ); + n = (int32_t)stdlib_base_ceil( random_uniform( 1.0, 20.0 ) ); + y = stdlib_base_dists_signrank_quantile( p, n ); + printf( "p: %lf, n: %d, f(x;n): %lf\n", p, n, y ); + } +} +``` + +
+ + + +
+ + +