You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Licensed under the Apache License, Version 2.0 (the "License");
196
+
* you may not use this file except in compliance with the License.
197
+
* You may obtain a copy of the License at
198
+
*
199
+
* http://www.apache.org/licenses/LICENSE-2.0
200
+
*
201
+
* Unless required by applicable law or agreed to in writing, software
202
+
* distributed under the License is distributed on an "AS IS" BASIS,
203
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+
* See the License for the specific language governing permissions and
205
+
* limitations under the License.
206
+
*/
207
+
208
+
'use strict';
209
+
210
+
// MODULES //
211
+
212
+
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
213
+
var ndarray = require( './ndarray.js' );
214
+
215
+
216
+
// MAIN //
217
+
218
+
/**
219
+
* Computes a one-sample Z-test for a double-precision floating-point strided array.
220
+
*
221
+
* @param {PositiveInteger} N - number of indexed elements
222
+
* @param {string} alternative - alternative hypothesis
223
+
* @param {number} alpha - significance level
224
+
* @param {number} mu - mean under the null hypothesis
225
+
* @param {PositiveNumber} sigma - known standard deviation
226
+
* @param {Float64Array} x - input array
227
+
* @param {integer} strideX - stride length
228
+
* @param {Object} out - output results object
229
+
* @returns {Object} results object
230
+
*
231
+
* @example
232
+
* var Float64Array = require( '@stdlib/array/float64' );
233
+
* var Results = require( '@stdlib/stats/base/ztest/one-sample/results/float64' );
234
+
*
235
+
* var x = new Float64Array( [ 4.0, 4.0, 6.0, 6.0, 5.0 ] );
236
+
*
237
+
* var results = new Results();
238
+
* var out = dztest( x.length, 'two-sided', 0.05, 0.0, 1.0, x, 1, results );
239
+
* // returns {...}
240
+
*
241
+
* var bool = ( out === results );
242
+
* // returns true
243
+
*/
244
+
<spanclass="cstat-no" title="statement not covered" ><spanclass="fstat-no" title="function not covered" >function dztest( N, alternative, alpha, mu, sigma, x, strideX, out ) {</span></span>
245
+
<spanclass="cstat-no" title="statement not covered" > return ndarray( N, alternative, alpha, mu, sigma, x, strideX, stride2offset( N, strideX ), out ); // eslint-disable-line max-len</span>
246
+
<spanclass="cstat-no" title="statement not covered" >}</span>
247
+
248
+
249
+
// EXPORTS //
250
+
251
+
module.exports = dztest;
252
+
</pre></td></tr></table></pre>
253
+
254
+
<divclass='push'></div><!-- for sticky footer -->
255
+
</div><!-- /wrapper -->
256
+
<divclass='footer quiet pad2 space-top1 center small'>
0 commit comments