]> Creatis software - CreaPhase.git/blob - octave_packages/statistics-1.1.3/doc-cache
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / statistics-1.1.3 / doc-cache
1 # Created by Octave 3.6.1, Sun May 13 12:55:35 2012 UTC <root@brouzouf>
2 # name: cache
3 # type: cell
4 # rows: 3
5 # columns: 77
6 # name: <cell-element>
7 # type: sq_string
8 # elements: 1
9 # length: 20
10 anderson_darling_cdf
11
12
13 # name: <cell-element>
14 # type: sq_string
15 # elements: 1
16 # length: 2184
17  -- Function File: P = anderson_darling_cdf (A, N)
18      Return the CDF for the given Anderson-Darling coefficient A
19      computed from N values sampled from a distribution. For a vector
20      of random variables X of length N, compute the CDF of the values
21      from the distribution from which they are drawn.  You can uses
22      these values to compute A as follows:
23
24           A = -N - sum( (2*i-1) .* (log(X) + log(1 - X(N:-1:1,:))) )/N;
25
26      From the value A, `anderson_darling_cdf' returns the probability
27      that A could be returned from a set of samples.
28
29      The algorithm given in [1] claims to be an approximation for the
30      Anderson-Darling CDF accurate to 6 decimal points.
31
32      Demonstrate using:
33
34           n = 300; reps = 10000;
35           z = randn(n, reps);
36           x = sort ((1 + erf (z/sqrt (2)))/2);
37           i = [1:n]' * ones (1, size (x, 2));
38           A = -n - sum ((2*i-1) .* (log (x) + log (1 - x (n:-1:1, :))))/n;
39           p = anderson_darling_cdf (A, n);
40           hist (100 * p, [1:100] - 0.5);
41
42      You will see that the histogram is basically flat, which is to say
43      that the probabilities returned by the Anderson-Darling CDF are
44      distributed uniformly.
45
46      You can easily determine the extreme values of P:
47
48           [junk, idx] = sort (p);
49
50      The histograms of various P aren't  very informative:
51
52           histfit (z (:, idx (1)), linspace (-3, 3, 15));
53           histfit (z (:, idx (end/2)), linspace (-3, 3, 15));
54           histfit (z (:, idx (end)), linspace (-3, 3, 15));
55
56      More telling is the qqplot:
57
58           qqplot (z (:, idx (1))); hold on; plot ([-3, 3], [-3, 3], ';;'); hold off;
59           qqplot (z (:, idx (end/2))); hold on; plot ([-3, 3], [-3, 3], ';;'); hold off;
60           qqplot (z (:, idx (end))); hold on; plot ([-3, 3], [-3, 3], ';;'); hold off;
61
62      Try a similarly analysis for Z uniform:
63
64           z = rand (n, reps); x = sort(z);
65
66      and for Z exponential:
67
68           z = rande (n, reps); x = sort (1 - exp (-z));
69
70      [1] Marsaglia, G; Marsaglia JCW; (2004) "Evaluating the Anderson
71      Darling distribution", Journal of Statistical Software, 9(2).
72
73      See also: anderson_darling_test
74
75
76
77
78
79 # name: <cell-element>
80 # type: sq_string
81 # elements: 1
82 # length: 80
83 Return the CDF for the given Anderson-Darling coefficient A computed
84 from N valu
85
86
87
88 # name: <cell-element>
89 # type: sq_string
90 # elements: 1
91 # length: 21
92 anderson_darling_test
93
94
95 # name: <cell-element>
96 # type: sq_string
97 # elements: 1
98 # length: 1834
99  -- Function File: [Q, ASQ, INFO] =  = anderson_darling_test (X,
100           DISTRIBUTION)
101      Test the hypothesis that X is selected from the given distribution
102      using the Anderson-Darling test.  If the returned Q is small,
103      reject the hypothesis at the Q*100% level.
104
105      The Anderson-Darling A^2 statistic is calculated as follows:
106
107                         n
108           A^2_n = -n - SUM (2i-1)/n log(z_i (1 - z_{n-i+1}))
109                        i=1
110
111      where z_i is the ordered position of the X's in the CDF of the
112      distribution.  Unlike the Kolmogorov-Smirnov statistic, the
113      Anderson-Darling statistic is sensitive to the tails of the
114      distribution.
115
116      The DISTRIBUTION argument must be a either "uniform", "normal", or
117      "exponential".
118
119      For "normal"' and "exponential" distributions, estimate the
120      distribution parameters from the data, convert the values to CDF
121      values, and compare the result to tabluated critical values.  This
122      includes an correction for small N which works well enough for N
123      >= 8, but less so from smaller N.  The returned
124      `info.Asq_corrected' contains the adjusted statistic.
125
126      For "uniform", assume the values are uniformly distributed in
127      (0,1), compute A^2 and return the corresponding p-value from
128      `1-anderson_darling_cdf(A^2,n)'.
129
130      If you are selecting from a known distribution, convert your
131      values into CDF values for the distribution and use "uniform".  Do
132      not use "uniform" if the distribution parameters are estimated
133      from the data itself, as this sharply biases the A^2 statistic
134      toward smaller values.
135
136      [1] Stephens, MA; (1986), "Tests based on EDF statistics", in
137      D'Agostino, RB; Stephens, MA; (eds.) Goodness-of-fit Techinques.
138      New York: Dekker.
139
140      See also: anderson_darling_cdf
141
142
143
144
145
146 # name: <cell-element>
147 # type: sq_string
148 # elements: 1
149 # length: 80
150 Test the hypothesis that X is selected from the given distribution
151 using the And
152
153
154
155 # name: <cell-element>
156 # type: sq_string
157 # elements: 1
158 # length: 6
159 anovan
160
161
162 # name: <cell-element>
163 # type: sq_string
164 # elements: 1
165 # length: 1504
166  -- Function File: [PVAL, F, DF_B, DF_E] = anovan (DATA, GRPS)
167  -- Function File: [PVAL, F, DF_B, DF_E] = anovan (DATA, GRPS,
168           'param1', VALUE1)
169      Perform a multi-way analysis of variance (ANOVA).  The goal is to
170      test whether the population means of data taken from K different
171      groups are all equal.
172
173      Data is a single vector DATA with groups specified by a
174      corresponding matrix of group labels GRPS, where GRPS has the same
175      number of rows as DATA. For example, if DATA = [1.1;1.2]; GRPS=
176      [1,2,1; 1,5,2]; then data point 1.1 was measured under conditions
177      1,2,1 and data point 1.2 was measured under conditions 1,5,2.
178      Note that groups do not need to be sequentially numbered.
179
180      By default, a 'linear' model is used, computing the N main effects
181      with no interactions. this may be modified by param 'model'
182
183      p= anovan(data,groups, 'model', modeltype) - modeltype = 'linear':
184      compute N main effects - modeltype = 'interaction': compute N
185      effects and                               N*(N-1) two-factor
186      interactions - modeltype = 'full': compute interactions at all
187      levels
188
189      Under the null of constant means, the statistic F follows an F
190      distribution with DF_B and DF_E degrees of freedom.
191
192      The p-value (1 minus the CDF of this distribution at F) is
193      returned in PVAL.
194
195      If no output argument is given, the standard one-way ANOVA table is
196      printed.
197
198      BUG: DFE is incorrect for modeltypes != full
199
200
201
202
203 # name: <cell-element>
204 # type: sq_string
205 # elements: 1
206 # length: 49
207 Perform a multi-way analysis of variance (ANOVA).
208
209
210
211 # name: <cell-element>
212 # type: sq_string
213 # elements: 1
214 # length: 8
215 betastat
216
217
218 # name: <cell-element>
219 # type: sq_string
220 # elements: 1
221 # length: 993
222  -- Function File: [M, V] = betastat (A, B)
223      Compute mean and variance of the beta distribution.
224
225 Arguments
226 ---------
227
228         * A is the first parameter of the beta distribution. A must be
229           positive
230
231         * B is the second parameter of the beta distribution. B must be
232           positive
233      A and B must be of common size or one of them must be scalar
234
235 Return values
236 -------------
237
238         * M is the mean of the beta distribution
239
240         * V is the variance of the beta distribution
241
242 Examples
243 --------
244
245           a = 1:6;
246           b = 1:0.2:2;
247           [m, v] = betastat (a, b)
248
249           [m, v] = betastat (a, 1.5)
250
251 References
252 ----------
253
254        1. Wendy L. Martinez and Angel R. Martinez. `Computational
255           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
256           Chapman & Hall/CRC, 2001.
257
258        2. Athanasios Papoulis. `Probability, Random Variables, and
259           Stochastic Processes'. McGraw-Hill, New York, second edition,
260           1984.
261
262
263
264
265 # name: <cell-element>
266 # type: sq_string
267 # elements: 1
268 # length: 51
269 Compute mean and variance of the beta distribution.
270
271
272
273 # name: <cell-element>
274 # type: sq_string
275 # elements: 1
276 # length: 8
277 binostat
278
279
280 # name: <cell-element>
281 # type: sq_string
282 # elements: 1
283 # length: 1057
284  -- Function File: [M, V] = binostat (N, P)
285      Compute mean and variance of the binomial distribution.
286
287 Arguments
288 ---------
289
290         * N is the first parameter of the binomial distribution. The
291           elements of N must be natural numbers
292
293         * P is the second parameter of the binomial distribution. The
294           elements of P must be probabilities
295      N and P must be of common size or one of them must be scalar
296
297 Return values
298 -------------
299
300         * M is the mean of the binomial distribution
301
302         * V is the variance of the binomial distribution
303
304 Examples
305 --------
306
307           n = 1:6;
308           p = 0:0.2:1;
309           [m, v] = binostat (n, p)
310
311           [m, v] = binostat (n, 0.5)
312
313 References
314 ----------
315
316        1. Wendy L. Martinez and Angel R. Martinez. `Computational
317           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
318           Chapman & Hall/CRC, 2001.
319
320        2. Athanasios Papoulis. `Probability, Random Variables, and
321           Stochastic Processes'. McGraw-Hill, New York, second edition,
322           1984.
323
324
325
326
327 # name: <cell-element>
328 # type: sq_string
329 # elements: 1
330 # length: 55
331 Compute mean and variance of the binomial distribution.
332
333
334
335 # name: <cell-element>
336 # type: sq_string
337 # elements: 1
338 # length: 7
339 boxplot
340
341
342 # name: <cell-element>
343 # type: sq_string
344 # elements: 1
345 # length: 2363
346  -- Function File: S = boxplot (DATA, NOTCHED, SYMBOL, VERTICAL,
347           MAXWHISKER, ...)
348  -- Function File: [... H]= boxplot (...)
349      Produce a box plot.
350
351      The box plot is a graphical display that simultaneously describes
352      several important features of a data set, such as center, spread,
353      departure from symmetry, and identification of observations that
354      lie unusually far from the bulk of the data.
355
356      DATA is a matrix with one column for each data set, or data is a
357      cell vector with one cell for each data set.
358
359      NOTCHED = 1 produces a notched-box plot. Notches represent a robust
360      estimate of the uncertainty about the median.
361
362      NOTCHED = 0 (default) produces a rectangular box plot.
363
364      NOTCHED in (0,1) produces a notch of the specified depth.  notched
365      values outside (0,1) are amusing if not exactly practical.
366
367      SYMBOL sets the symbol for the outlier values, default symbol for
368      points that lie outside 3 times the interquartile range is 'o',
369      default symbol for points between 1.5 and 3 times the interquartile
370      range is '+'.
371
372      SYMBOL = '.' points between 1.5 and 3 times the IQR is marked with
373      '.' and points outside 3 times IQR with 'o'.
374
375      SYMBOL = ['x','*'] points between 1.5 and 3 times the IQR is
376      marked with 'x' and points outside 3 times IQR with '*'.
377
378      VERTICAL = 0 makes the boxes horizontal, by default VERTICAL = 1.
379
380      MAXWHISKER defines the length of the whiskers as a function of the
381      IQR (default = 1.5). If MAXWHISKER = 0 then `boxplot' displays all
382      data values outside the box using the plotting symbol for points
383      that lie outside 3 times the IQR.
384
385      Supplemental arguments are concatenated and passed to plot.
386
387      The returned matrix S has one column for each data set as follows:
388
389      1       Minimum
390      2       1st quartile
391      3       2nd quartile (median)
392      4       3rd quartile
393      5       Maximum
394      6       Lower confidence limit for median
395      7       Upper confidence limit for median
396
397      The returned structure H has hanldes to the plot elements, allowing
398      customization of the visualization using set/get functions.
399
400      Example
401
402           title ("Grade 3 heights");
403           axis ([0,3]);
404           tics ("x", 1:2, {"girls"; "boys"});
405           boxplot ({randn(10,1)*5+140, randn(13,1)*8+135});
406
407
408
409
410
411 # name: <cell-element>
412 # type: sq_string
413 # elements: 1
414 # length: 19
415 Produce a box plot.
416
417
418
419 # name: <cell-element>
420 # type: sq_string
421 # elements: 1
422 # length: 8
423 caseread
424
425
426 # name: <cell-element>
427 # type: sq_string
428 # elements: 1
429 # length: 264
430  -- Function File: NAMES = caseread (FILENAME)
431      Read case names from an ascii file.
432
433      Essentially, this reads all lines from a file as text and returns
434      them in a string matrix.
435
436      See also: casewrite, tblread, tblwrite, csv2cell, cell2csv, fopen
437
438
439
440
441
442 # name: <cell-element>
443 # type: sq_string
444 # elements: 1
445 # length: 35
446 Read case names from an ascii file.
447
448
449
450 # name: <cell-element>
451 # type: sq_string
452 # elements: 1
453 # length: 9
454 casewrite
455
456
457 # name: <cell-element>
458 # type: sq_string
459 # elements: 1
460 # length: 257
461  -- Function File:  casewrite (STRMAT, FILENAME)
462      Write case names to an ascii file.
463
464      Essentially, this writes all lines from STRMAT to FILENAME (after
465      deblanking them).
466
467      See also: caseread, tblread, tblwrite, csv2cell, cell2csv, fopen
468
469
470
471
472
473 # name: <cell-element>
474 # type: sq_string
475 # elements: 1
476 # length: 34
477 Write case names to an ascii file.
478
479
480
481 # name: <cell-element>
482 # type: sq_string
483 # elements: 1
484 # length: 8
485 chi2stat
486
487
488 # name: <cell-element>
489 # type: sq_string
490 # elements: 1
491 # length: 800
492  -- Function File: [M, V] = chi2stat (N)
493      Compute mean and variance of the chi-square distribution.
494
495 Arguments
496 ---------
497
498         * N is the parameter of the chi-square distribution. The
499           elements of N must be positive
500
501 Return values
502 -------------
503
504         * M is the mean of the chi-square distribution
505
506         * V is the variance of the chi-square distribution
507
508 Example
509 -------
510
511           n = 1:6;
512           [m, v] = chi2stat (n)
513
514 References
515 ----------
516
517        1. Wendy L. Martinez and Angel R. Martinez. `Computational
518           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
519           Chapman & Hall/CRC, 2001.
520
521        2. Athanasios Papoulis. `Probability, Random Variables, and
522           Stochastic Processes'. McGraw-Hill, New York, second edition,
523           1984.
524
525
526
527
528 # name: <cell-element>
529 # type: sq_string
530 # elements: 1
531 # length: 57
532 Compute mean and variance of the chi-square distribution.
533
534
535
536 # name: <cell-element>
537 # type: sq_string
538 # elements: 1
539 # length: 11
540 cl_multinom
541
542
543 # name: <cell-element>
544 # type: sq_string
545 # elements: 1
546 # length: 2978
547  -- Function File: CL = cl_multinom (X, N, B, CALCULATION_TYPE ) -
548           Confidence level of multinomial portions
549      Returns confidence level of multinomial parameters estimated  p =
550      x / sum(x)  with predefined confidence interval B.     Finite
551      population is also considered.
552
553      This function calculates the level of confidence at which the
554      samples represent the true distribution given that there is a
555      predefined tolerance (confidence interval).  This is the upside
556      down case of the typical excercises at which we want to get the
557      confidence interval given the confidence level (and the estimated
558      parameters of the underlying distribution).  But once we accept
559      (lets say at elections) that we have a standard predefined maximal
560      acceptable error rate (e.g. B=0.02 ) in the estimation and we just
561      want to know that how sure we can be that the measured proportions
562      are the same as in the entire population (ie. the expected value
563      and mean of the samples are roghly the same) we need to use this
564      function.
565
566 Arguments
567 ---------
568
569         * X  : int vector  : sample frequencies bins
570
571         * N  : int         : Population size that was sampled by x. If
572           N<sum(x), infinite number assumed
573
574         * B  : real, vector :  confidence interval            if
575           vector, it should be the size of x containing confence
576           interval for each cells            if scalar, each cell will
577           have the same value of b unless it is zero or -1
578           if value is 0, b=.02 is assumed which is standard choice at
579           elections            otherwise it is calculated in a way that
580           one sample in a cell alteration defines the confidence
581           interval
582
583         * CALCULATION_TYPE  : string    : (Optional), described below
584                  "bromaghin"     (default) - do not change it unless
585           you have a good reason to do so           "cochran"
586           "agresti_cull"  this is not exactly the solution at reference
587           given below but an adjustment of the solutions above
588
589 Returns
590 -------
591
592      Confidence level.
593
594 Example
595 -------
596
597      CL = cl_multinom( [27;43;19;11], 10000, 0.05 )     returns 0.69
598 confidence level.
599
600 References
601 ----------
602
603      "bromaghin" calculation type (default) is based on is based on the
604 article   Jeffrey F. Bromaghin, "Sample Size Determination for Interval
605 Estimation of Multinomial Probabilities", The American Statistician
606 vol 47, 1993, pp 203-206.
607
608      "cochran" calculation type is based on article   Robert T.
609 Tortora, "A Note on Sample Size Estimation for Multinomial
610 Populations", The American Statistician, , Vol 32. 1978,  pp 100-102.
611
612      "agresti_cull" calculation type is based on article in which
613 Quesenberry Hurst and Goodman result is combined   A. Agresti and B.A.
614 Coull, "Approximate is better than \"exact\" for interval estimation of
615 binomial portions", The American Statistician, Vol. 52, 1998, pp 119-126
616
617
618
619
620
621 # name: <cell-element>
622 # type: sq_string
623 # elements: 1
624 # length: 80
625 Returns confidence level of multinomial parameters estimated  p = x /
626 sum(x)  wi
627
628
629
630 # name: <cell-element>
631 # type: sq_string
632 # elements: 1
633 # length: 6
634 combnk
635
636
637 # name: <cell-element>
638 # type: sq_string
639 # elements: 1
640 # length: 93
641  -- Function File: C = combnk (DATA, K)
642      Return all combinations of K elements in DATA.
643
644
645
646
647 # name: <cell-element>
648 # type: sq_string
649 # elements: 1
650 # length: 46
651 Return all combinations of K elements in DATA.
652
653
654
655 # name: <cell-element>
656 # type: sq_string
657 # elements: 1
658 # length: 9
659 copulacdf
660
661
662 # name: <cell-element>
663 # type: sq_string
664 # elements: 1
665 # length: 2148
666  -- Function File: P = copulacdf (FAMILY, X, THETA)
667  -- Function File:  copulacdf ('t', X, THETA, NU)
668      Compute the cumulative distribution function of a copula family.
669
670 Arguments
671 ---------
672
673         * FAMILY is the copula family name. Currently, FAMILY can be
674           `'Gaussian'' for the Gaussian family, `'t'' for the Student's
675           t family, `'Clayton'' for the Clayton family, `'Gumbel'' for
676           the Gumbel-Hougaard family, `'Frank'' for the Frank family,
677           `'AMH'' for the Ali-Mikhail-Haq family, or `'FGM'' for the
678           Farlie-Gumbel-Morgenstern family.
679
680         * X is the support where each row corresponds to an observation.
681
682         * THETA is the parameter of the copula. For the Gaussian and
683           Student's t copula, THETA must be a correlation matrix. For
684           bivariate copulas THETA can also be a correlation coefficient.
685           For the Clayton family, the Gumbel-Hougaard family, the Frank
686           family, and the Ali-Mikhail-Haq family, THETA must be a
687           vector with the same number of elements as observations in X
688           or be scalar. For the Farlie-Gumbel-Morgenstern family, THETA
689           must be a matrix of coefficients for the
690           Farlie-Gumbel-Morgenstern polynomial where each row
691           corresponds to one set of coefficients for an observation in
692           X. A single row is expanded. The coefficients are in binary
693           order.
694
695         * NU is the degrees of freedom for the Student's t family.  NU
696           must be a vector with the same number of elements as
697           observations in X or be scalar.
698
699 Return values
700 -------------
701
702         * P is the cumulative distribution of the copula at each row of
703           X and corresponding parameter THETA.
704
705 Examples
706 --------
707
708           x = [0.2:0.2:0.6; 0.2:0.2:0.6];
709           theta = [1; 2];
710           p = copulacdf ("Clayton", x, theta)
711
712           x = [0.2:0.2:0.6; 0.2:0.1:0.4];
713           theta = [0.2, 0.1, 0.1, 0.05];
714           p = copulacdf ("FGM", x, theta)
715
716 References
717 ----------
718
719        1. Roger B. Nelsen. `An Introduction to Copulas'. Springer, New
720           York, second edition, 2006.
721
722
723
724
725 # name: <cell-element>
726 # type: sq_string
727 # elements: 1
728 # length: 64
729 Compute the cumulative distribution function of a copula family.
730
731
732
733 # name: <cell-element>
734 # type: sq_string
735 # elements: 1
736 # length: 9
737 copulapdf
738
739
740 # name: <cell-element>
741 # type: sq_string
742 # elements: 1
743 # length: 1451
744  -- Function File: P = copulapdf (FAMILY, X, THETA)
745      Compute the probability density function of a copula family.
746
747 Arguments
748 ---------
749
750         * FAMILY is the copula family name. Currently, FAMILY can be
751           `'Clayton'' for the Clayton family, `'Gumbel'' for the
752           Gumbel-Hougaard family, `'Frank'' for the Frank family, or
753           `'AMH'' for the Ali-Mikhail-Haq family.
754
755         * X is the support where each row corresponds to an observation.
756
757         * THETA is the parameter of the copula. The elements of THETA
758           must be greater than or equal to `-1' for the Clayton family,
759           greater than or equal to `1' for the Gumbel-Hougaard family,
760           arbitrary for the Frank family, and greater than or equal to
761           `-1' and lower than `1' for the Ali-Mikhail-Haq family.
762           Moreover, THETA must be non-negative for dimensions greater
763           than `2'. THETA must be a column vector with the same number
764           of rows as X or be scalar.
765
766 Return values
767 -------------
768
769         * P is the probability density of the copula at each row of X
770           and corresponding parameter THETA.
771
772 Examples
773 --------
774
775           x = [0.2:0.2:0.6; 0.2:0.2:0.6];
776           theta = [1; 2];
777           p = copulapdf ("Clayton", x, theta)
778
779           p = copulapdf ("Gumbel", x, 2)
780
781 References
782 ----------
783
784        1. Roger B. Nelsen. `An Introduction to Copulas'. Springer, New
785           York, second edition, 2006.
786
787
788
789
790 # name: <cell-element>
791 # type: sq_string
792 # elements: 1
793 # length: 60
794 Compute the probability density function of a copula family.
795
796
797
798 # name: <cell-element>
799 # type: sq_string
800 # elements: 1
801 # length: 9
802 copularnd
803
804
805 # name: <cell-element>
806 # type: sq_string
807 # elements: 1
808 # length: 1852
809  -- Function File: X = copularnd (FAMILY, THETA, N)
810  -- Function File:  copularnd (FAMILY, THETA, N, D)
811  -- Function File:  copularnd ('t', THETA, NU, N)
812      Generate random samples from a copula family.
813
814 Arguments
815 ---------
816
817         * FAMILY is the copula family name. Currently, FAMILY can be
818           `'Gaussian'' for the Gaussian family, `'t'' for the Student's
819           t family, or `'Clayton'' for the Clayton family.
820
821         * THETA is the parameter of the copula. For the Gaussian and
822           Student's t copula, THETA must be a correlation matrix. For
823           bivariate copulas THETA can also be a correlation
824           coefficient. For the Clayton family, THETA must be a vector
825           with the same number of elements as samples to be generated
826           or be scalar.
827
828         * NU is the degrees of freedom for the Student's t family. NU
829           must be a vector with the same number of elements as samples
830           to be generated or be scalar.
831
832         * N is the number of rows of the matrix to be generated. N must
833           be a non-negative integer and corresponds to the number of
834           samples to be generated.
835
836         * D is the number of columns of the matrix to be generated. D
837           must be a positive integer and corresponds to the dimension
838           of the copula.
839
840 Return values
841 -------------
842
843         * X is a matrix of random samples from the copula with N samples
844           of distribution dimension D.
845
846 Examples
847 --------
848
849           theta = 0.5;
850           x = copularnd ("Gaussian", theta);
851
852           theta = 0.5;
853           nu = 2;
854           x = copularnd ("t", theta, nu);
855
856           theta = 0.5;
857           n = 2;
858           x = copularnd ("Clayton", theta, n);
859
860 References
861 ----------
862
863        1. Roger B. Nelsen. `An Introduction to Copulas'. Springer, New
864           York, second edition, 2006.
865
866
867
868
869 # name: <cell-element>
870 # type: sq_string
871 # elements: 1
872 # length: 45
873 Generate random samples from a copula family.
874
875
876
877 # name: <cell-element>
878 # type: sq_string
879 # elements: 1
880 # length: 7
881 expstat
882
883
884 # name: <cell-element>
885 # type: sq_string
886 # elements: 1
887 # length: 802
888  -- Function File: [M, V] = expstat (L)
889      Compute mean and variance of the exponential distribution.
890
891 Arguments
892 ---------
893
894         * L is the parameter of the exponential distribution. The
895           elements of L must be positive
896
897 Return values
898 -------------
899
900         * M is the mean of the exponential distribution
901
902         * V is the variance of the exponential distribution
903
904 Example
905 -------
906
907           l = 1:6;
908           [m, v] = expstat (l)
909
910 References
911 ----------
912
913        1. Wendy L. Martinez and Angel R. Martinez. `Computational
914           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
915           Chapman & Hall/CRC, 2001.
916
917        2. Athanasios Papoulis. `Probability, Random Variables, and
918           Stochastic Processes'. McGraw-Hill, New York, second edition,
919           1984.
920
921
922
923
924 # name: <cell-element>
925 # type: sq_string
926 # elements: 1
927 # length: 58
928 Compute mean and variance of the exponential distribution.
929
930
931
932 # name: <cell-element>
933 # type: sq_string
934 # elements: 1
935 # length: 4
936 ff2n
937
938
939 # name: <cell-element>
940 # type: sq_string
941 # elements: 1
942 # length: 100
943  -- Function File: ff2n (N)
944      Full-factor design with n binary terms.
945
946      See also: fullfact
947
948
949
950
951
952 # name: <cell-element>
953 # type: sq_string
954 # elements: 1
955 # length: 39
956 Full-factor design with n binary terms.
957
958
959
960 # name: <cell-element>
961 # type: sq_string
962 # elements: 1
963 # length: 5
964 fstat
965
966
967 # name: <cell-element>
968 # type: sq_string
969 # elements: 1
970 # length: 1120
971  -- Function File: [MN, V] = fstat (M, N)
972      Compute mean and variance of the F distribution.
973
974 Arguments
975 ---------
976
977         * M is the first parameter of the F distribution. The elements
978           of M must be positive
979
980         * N is the second parameter of the F distribution. The elements
981           of N must be positive
982      M and N must be of common size or one of them must be scalar
983
984 Return values
985 -------------
986
987         * MN is the mean of the F distribution. The mean is undefined
988           for N not greater than 2
989
990         * V is the variance of the F distribution. The variance is
991           undefined for N not greater than 4
992
993 Examples
994 --------
995
996           m = 1:6;
997           n = 5:10;
998           [mn, v] = fstat (m, n)
999
1000           [mn, v] = fstat (m, 5)
1001
1002 References
1003 ----------
1004
1005        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1006           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1007           Chapman & Hall/CRC, 2001.
1008
1009        2. Athanasios Papoulis. `Probability, Random Variables, and
1010           Stochastic Processes'. McGraw-Hill, New York, second edition,
1011           1984.
1012
1013
1014
1015
1016 # name: <cell-element>
1017 # type: sq_string
1018 # elements: 1
1019 # length: 48
1020 Compute mean and variance of the F distribution.
1021
1022
1023
1024 # name: <cell-element>
1025 # type: sq_string
1026 # elements: 1
1027 # length: 8
1028 fullfact
1029
1030
1031 # name: <cell-element>
1032 # type: sq_string
1033 # elements: 1
1034 # length: 264
1035  -- Function File: fullfact (N)
1036      Full factorial design.
1037
1038      If N is a scalar, return the full factorial design with N binary
1039      choices, 0 and 1.
1040
1041      If N is a vector, return the full factorial design with choices 1
1042      through N_I for each factor I.
1043
1044
1045
1046
1047
1048 # name: <cell-element>
1049 # type: sq_string
1050 # elements: 1
1051 # length: 22
1052 Full factorial design.
1053
1054
1055
1056 # name: <cell-element>
1057 # type: sq_string
1058 # elements: 1
1059 # length: 6
1060 gamfit
1061
1062
1063 # name: <cell-element>
1064 # type: sq_string
1065 # elements: 1
1066 # length: 170
1067  -- Function File:  [A B] = gamfit (R)
1068      Finds the maximumlikelihood estimator for the Gamma distribution
1069      for R
1070
1071      See also: gampdf, gaminv, gamrnd, gamlike
1072
1073
1074
1075
1076
1077 # name: <cell-element>
1078 # type: sq_string
1079 # elements: 1
1080 # length: 71
1081 Finds the maximumlikelihood estimator for the Gamma distribution for R
1082
1083
1084
1085
1086 # name: <cell-element>
1087 # type: sq_string
1088 # elements: 1
1089 # length: 7
1090 gamlike
1091
1092
1093 # name: <cell-element>
1094 # type: sq_string
1095 # elements: 1
1096 # length: 226
1097  -- Function File: X = gamlike ([A B], R)
1098      Calculates the negative log-likelihood function for the Gamma
1099      distribution over vector R, with the given parameters A and B.
1100
1101      See also: gampdf, gaminv, gamrnd, gamfit
1102
1103
1104
1105
1106
1107 # name: <cell-element>
1108 # type: sq_string
1109 # elements: 1
1110 # length: 80
1111 Calculates the negative log-likelihood function for the Gamma
1112 distribution over 
1113
1114
1115
1116 # name: <cell-element>
1117 # type: sq_string
1118 # elements: 1
1119 # length: 7
1120 gamstat
1121
1122
1123 # name: <cell-element>
1124 # type: sq_string
1125 # elements: 1
1126 # length: 995
1127  -- Function File: [M, V] = gamstat (A, B)
1128      Compute mean and variance of the gamma distribution.
1129
1130 Arguments
1131 ---------
1132
1133         * A is the first parameter of the gamma distribution. A must be
1134           positive
1135
1136         * B is the second parameter of the gamma distribution. B must be
1137           positive
1138      A and B must be of common size or one of them must be scalar
1139
1140 Return values
1141 -------------
1142
1143         * M is the mean of the gamma distribution
1144
1145         * V is the variance of the gamma distribution
1146
1147 Examples
1148 --------
1149
1150           a = 1:6;
1151           b = 1:0.2:2;
1152           [m, v] = gamstat (a, b)
1153
1154           [m, v] = gamstat (a, 1.5)
1155
1156 References
1157 ----------
1158
1159        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1160           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1161           Chapman & Hall/CRC, 2001.
1162
1163        2. Athanasios Papoulis. `Probability, Random Variables, and
1164           Stochastic Processes'. McGraw-Hill, New York, second edition,
1165           1984.
1166
1167
1168
1169
1170 # name: <cell-element>
1171 # type: sq_string
1172 # elements: 1
1173 # length: 52
1174 Compute mean and variance of the gamma distribution.
1175
1176
1177
1178 # name: <cell-element>
1179 # type: sq_string
1180 # elements: 1
1181 # length: 7
1182 geomean
1183
1184
1185 # name: <cell-element>
1186 # type: sq_string
1187 # elements: 1
1188 # length: 177
1189  -- Function File: geomean (X)
1190  -- Function File: geomean (X, DIM)
1191      Compute the geometric mean.
1192
1193      This function does the same as `mean (x, "g")'.
1194
1195      See also: mean
1196
1197
1198
1199
1200
1201 # name: <cell-element>
1202 # type: sq_string
1203 # elements: 1
1204 # length: 27
1205 Compute the geometric mean.
1206
1207
1208
1209 # name: <cell-element>
1210 # type: sq_string
1211 # elements: 1
1212 # length: 7
1213 geostat
1214
1215
1216 # name: <cell-element>
1217 # type: sq_string
1218 # elements: 1
1219 # length: 811
1220  -- Function File: [M, V] = geostat (P)
1221      Compute mean and variance of the geometric distribution.
1222
1223 Arguments
1224 ---------
1225
1226         * P is the rate parameter of the geometric distribution. The
1227           elements of P must be probabilities
1228
1229 Return values
1230 -------------
1231
1232         * M is the mean of the geometric distribution
1233
1234         * V is the variance of the geometric distribution
1235
1236 Example
1237 -------
1238
1239           p = 1 ./ (1:6);
1240           [m, v] = geostat (p)
1241
1242 References
1243 ----------
1244
1245        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1246           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1247           Chapman & Hall/CRC, 2001.
1248
1249        2. Athanasios Papoulis. `Probability, Random Variables, and
1250           Stochastic Processes'. McGraw-Hill, New York, second edition,
1251           1984.
1252
1253
1254
1255
1256 # name: <cell-element>
1257 # type: sq_string
1258 # elements: 1
1259 # length: 56
1260 Compute mean and variance of the geometric distribution.
1261
1262
1263
1264 # name: <cell-element>
1265 # type: sq_string
1266 # elements: 1
1267 # length: 8
1268 harmmean
1269
1270
1271 # name: <cell-element>
1272 # type: sq_string
1273 # elements: 1
1274 # length: 178
1275  -- Function File: harmmean (X)
1276  -- Function File: harmmean (X, DIM)
1277      Compute the harmonic mean.
1278
1279      This function does the same as `mean (x, "h")'.
1280
1281      See also: mean
1282
1283
1284
1285
1286
1287 # name: <cell-element>
1288 # type: sq_string
1289 # elements: 1
1290 # length: 26
1291 Compute the harmonic mean.
1292
1293
1294
1295 # name: <cell-element>
1296 # type: sq_string
1297 # elements: 1
1298 # length: 7
1299 histfit
1300
1301
1302 # name: <cell-element>
1303 # type: sq_string
1304 # elements: 1
1305 # length: 412
1306  -- Function File: histfit (DATA, NBINS)
1307      Plot histogram with superimposed fitted normal density.
1308
1309      `histfit (DATA, NBINS)' plots a histogram of the values in the
1310      vector DATA using NBINS bars in the histogram. With one input
1311      argument, NBINS is set  to the square root of the number of
1312      elements in data.
1313
1314      Example
1315
1316           histfit (randn (100, 1))
1317
1318      See also: bar, hist, pareto
1319
1320
1321
1322
1323
1324 # name: <cell-element>
1325 # type: sq_string
1326 # elements: 1
1327 # length: 55
1328 Plot histogram with superimposed fitted normal density.
1329
1330
1331
1332 # name: <cell-element>
1333 # type: sq_string
1334 # elements: 1
1335 # length: 11
1336 hmmestimate
1337
1338
1339 # name: <cell-element>
1340 # type: sq_string
1341 # elements: 1
1342 # length: 4098
1343  -- Function File: [TRANSPROBEST, OUTPROBEST] = hmmestimate (SEQUENCE,
1344           STATES)
1345  -- Function File:  hmmestimate (..., 'statenames', STATENAMES)
1346  -- Function File:  hmmestimate (..., 'symbols', SYMBOLS)
1347  -- Function File:  hmmestimate (..., 'pseudotransitions',
1348           PSEUDOTRANSITIONS)
1349  -- Function File:  hmmestimate (..., 'pseudoemissions',
1350           PSEUDOEMISSIONS)
1351      Estimate the matrix of transition probabilities and the matrix of
1352      output probabilities of a given sequence of outputs and states
1353      generated by a hidden Markov model. The model assumes that the
1354      generation starts in state `1' at step `0' but does not include
1355      step `0' in the generated states and sequence.
1356
1357 Arguments
1358 ---------
1359
1360         * SEQUENCE is a vector of a sequence of given outputs. The
1361           outputs must be integers ranging from `1' to the number of
1362           outputs of the hidden Markov model.
1363
1364         * STATES is a vector of the same length as SEQUENCE of given
1365           states. The states must be integers ranging from `1' to the
1366           number of states of the hidden Markov model.
1367
1368 Return values
1369 -------------
1370
1371         * TRANSPROBEST is the matrix of the estimated transition
1372           probabilities of the states. `transprobest(i, j)' is the
1373           estimated probability of a transition to state `j' given
1374           state `i'.
1375
1376         * OUTPROBEST is the matrix of the estimated output
1377           probabilities.  `outprobest(i, j)' is the estimated
1378           probability of generating output `j' given state `i'.
1379
1380      If `'symbols'' is specified, then SEQUENCE is expected to be a
1381 sequence of the elements of SYMBOLS instead of integers.  SYMBOLS can
1382 be a cell array.
1383
1384      If `'statenames'' is specified, then STATES is expected to be a
1385 sequence of the elements of STATENAMES instead of integers.  STATENAMES
1386 can be a cell array.
1387
1388      If `'pseudotransitions'' is specified then the integer matrix
1389 PSEUDOTRANSITIONS is used as an initial number of counted transitions.
1390 `pseudotransitions(i, j)' is the initial number of counted transitions
1391 from state `i' to state `j'.  TRANSPROBEST will have the same size as
1392 PSEUDOTRANSITIONS.  Use this if you have transitions that are very
1393 unlikely to occur.
1394
1395      If `'pseudoemissions'' is specified then the integer matrix
1396 PSEUDOEMISSIONS is used as an initial number of counted outputs.
1397 `pseudoemissions(i, j)' is the initial number of counted outputs `j'
1398 given state `i'. If `'pseudoemissions'' is also specified then the
1399 number of rows of PSEUDOEMISSIONS must be the same as the number of
1400 rows of PSEUDOTRANSITIONS. OUTPROBEST will have the same size as
1401 PSEUDOEMISSIONS. Use this if you have outputs or states that are very
1402 unlikely to occur.
1403
1404 Examples
1405 --------
1406
1407           transprob = [0.8, 0.2; 0.4, 0.6];
1408           outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1];
1409           [sequence, states] = hmmgenerate (25, transprob, outprob);
1410           [transprobest, outprobest] = hmmestimate (sequence, states)
1411
1412           symbols = {'A', 'B', 'C'};
1413           statenames = {'One', 'Two'};
1414           [sequence, states] = hmmgenerate (25, transprob, outprob,
1415                                'symbols', symbols, 'statenames', statenames);
1416           [transprobest, outprobest] = hmmestimate (sequence, states,
1417                                        'symbols', symbols,
1418                                        'statenames', statenames)
1419
1420           pseudotransitions = [8, 2; 4, 6];
1421           pseudoemissions = [2, 4, 4; 7, 2, 1];
1422           [sequence, states] = hmmgenerate (25, transprob, outprob);
1423           [transprobest, outprobest] = hmmestimate (sequence, states, 'pseudotransitions', pseudotransitions, 'pseudoemissions', pseudoemissions)
1424
1425 References
1426 ----------
1427
1428        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1429           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1430           Chapman & Hall/CRC, 2001.
1431
1432        2. Lawrence R. Rabiner. A Tutorial on Hidden Markov Models and
1433           Selected Applications in Speech Recognition. `Proceedings of
1434           the IEEE', 77(2), pages 257-286, February 1989.
1435
1436
1437
1438
1439 # name: <cell-element>
1440 # type: sq_string
1441 # elements: 1
1442 # length: 80
1443 Estimate the matrix of transition probabilities and the matrix of output
1444 probabi
1445
1446
1447
1448 # name: <cell-element>
1449 # type: sq_string
1450 # elements: 1
1451 # length: 11
1452 hmmgenerate
1453
1454
1455 # name: <cell-element>
1456 # type: sq_string
1457 # elements: 1
1458 # length: 2406
1459  -- Function File: [SEQUENCE, STATES] = hmmgenerate (LEN, TRANSPROB,
1460           OUTPROB)
1461  -- Function File:  hmmgenerate (..., 'symbols', SYMBOLS)
1462  -- Function File:  hmmgenerate (..., 'statenames', STATENAMES)
1463      Generate an output sequence and hidden states of a hidden Markov
1464      model.  The model starts in state `1' at step `0' but will not
1465      include step `0' in the generated states and sequence.
1466
1467 Arguments
1468 ---------
1469
1470         * LEN is the number of steps to generate. SEQUENCE and STATES
1471           will have LEN entries each.
1472
1473         * TRANSPROB is the matrix of transition probabilities of the
1474           states.  `transprob(i, j)' is the probability of a transition
1475           to state `j' given state `i'.
1476
1477         * OUTPROB is the matrix of output probabilities.  `outprob(i,
1478           j)' is the probability of generating output `j' given state
1479           `i'.
1480
1481 Return values
1482 -------------
1483
1484         * SEQUENCE is a vector of length LEN of the generated outputs.
1485           The outputs are integers ranging from `1' to `columns
1486           (outprob)'.
1487
1488         * STATES is a vector of length LEN of the generated hidden
1489           states. The states are integers ranging from `1' to `columns
1490           (transprob)'.
1491
1492      If `'symbols'' is specified, then the elements of SYMBOLS are used
1493 for the output sequence instead of integers ranging from `1' to
1494 `columns (outprob)'. SYMBOLS can be a cell array.
1495
1496      If `'statenames'' is specified, then the elements of STATENAMES
1497 are used for the states instead of integers ranging from `1' to
1498 `columns (transprob)'. STATENAMES can be a cell array.
1499
1500 Examples
1501 --------
1502
1503           transprob = [0.8, 0.2; 0.4, 0.6];
1504           outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1];
1505           [sequence, states] = hmmgenerate (25, transprob, outprob)
1506
1507           symbols = {'A', 'B', 'C'};
1508           statenames = {'One', 'Two'};
1509           [sequence, states] = hmmgenerate (25, transprob, outprob,
1510                                'symbols', symbols, 'statenames', statenames)
1511
1512 References
1513 ----------
1514
1515        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1516           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1517           Chapman & Hall/CRC, 2001.
1518
1519        2. Lawrence R. Rabiner. A Tutorial on Hidden Markov Models and
1520           Selected Applications in Speech Recognition. `Proceedings of
1521           the IEEE', 77(2), pages 257-286, February 1989.
1522
1523
1524
1525
1526 # name: <cell-element>
1527 # type: sq_string
1528 # elements: 1
1529 # length: 71
1530 Generate an output sequence and hidden states of a hidden Markov model.
1531
1532
1533
1534 # name: <cell-element>
1535 # type: sq_string
1536 # elements: 1
1537 # length: 10
1538 hmmviterbi
1539
1540
1541 # name: <cell-element>
1542 # type: sq_string
1543 # elements: 1
1544 # length: 2559
1545  -- Function File: VPATH = hmmviterbi (SEQUENCE, TRANSPROB, OUTPROB)
1546  -- Function File:  hmmviterbi (..., 'symbols', SYMBOLS)
1547  -- Function File:  hmmviterbi (..., 'statenames', STATENAMES)
1548      Use the Viterbi algorithm to find the Viterbi path of a hidden
1549      Markov model given a sequence of outputs. The model assumes that
1550      the generation starts in state `1' at step `0' but does not
1551      include step `0' in the generated states and sequence.
1552
1553 Arguments
1554 ---------
1555
1556         * SEQUENCE is the vector of length LEN of given outputs. The
1557           outputs must be integers ranging from `1' to `columns
1558           (outprob)'.
1559
1560         * TRANSPROB is the matrix of transition probabilities of the
1561           states.  `transprob(i, j)' is the probability of a transition
1562           to state `j' given state `i'.
1563
1564         * OUTPROB is the matrix of output probabilities.  `outprob(i,
1565           j)' is the probability of generating output `j' given state
1566           `i'.
1567
1568 Return values
1569 -------------
1570
1571         * VPATH is the vector of the same length as SEQUENCE of the
1572           estimated hidden states. The states are integers ranging from
1573           `1' to `columns (transprob)'.
1574
1575      If `'symbols'' is specified, then SEQUENCE is expected to be a
1576 sequence of the elements of SYMBOLS instead of integers ranging from
1577 `1' to `columns (outprob)'. SYMBOLS can be a cell array.
1578
1579      If `'statenames'' is specified, then the elements of STATENAMES
1580 are used for the states in VPATH instead of integers ranging from `1'
1581 to `columns (transprob)'.  STATENAMES can be a cell array.
1582
1583 Examples
1584 --------
1585
1586           transprob = [0.8, 0.2; 0.4, 0.6];
1587           outprob = [0.2, 0.4, 0.4; 0.7, 0.2, 0.1];
1588           [sequence, states] = hmmgenerate (25, transprob, outprob)
1589           vpath = hmmviterbi (sequence, transprob, outprob)
1590
1591           symbols = {'A', 'B', 'C'};
1592           statenames = {'One', 'Two'};
1593           [sequence, states] = hmmgenerate (25, transprob, outprob,
1594                                'symbols', symbols, 'statenames', statenames)
1595           vpath = hmmviterbi (sequence, transprob, outprob,
1596                   'symbols', symbols, 'statenames', statenames)
1597
1598 References
1599 ----------
1600
1601        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1602           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1603           Chapman & Hall/CRC, 2001.
1604
1605        2. Lawrence R. Rabiner. A Tutorial on Hidden Markov Models and
1606           Selected Applications in Speech Recognition. `Proceedings of
1607           the IEEE', 77(2), pages 257-286, February 1989.
1608
1609
1610
1611
1612 # name: <cell-element>
1613 # type: sq_string
1614 # elements: 1
1615 # length: 80
1616 Use the Viterbi algorithm to find the Viterbi path of a hidden Markov
1617 model give
1618
1619
1620
1621 # name: <cell-element>
1622 # type: sq_string
1623 # elements: 1
1624 # length: 8
1625 hygestat
1626
1627
1628 # name: <cell-element>
1629 # type: sq_string
1630 # elements: 1
1631 # length: 1290
1632  -- Function File: [MN, V] = hygestat (T, M, N)
1633      Compute mean and variance of the hypergeometric distribution.
1634
1635 Arguments
1636 ---------
1637
1638         * T is the total size of the population of the hypergeometric
1639           distribution. The elements of T must be positive natural
1640           numbers
1641
1642         * M is the number of marked items of the hypergeometric
1643           distribution.  The elements of M must be natural numbers
1644
1645         * N is the size of the drawn sample of the hypergeometric
1646           distribution. The elements of N must be positive natural
1647           numbers
1648      T, M, and N must be of common size or scalar
1649
1650 Return values
1651 -------------
1652
1653         * MN is the mean of the hypergeometric distribution
1654
1655         * V is the variance of the hypergeometric distribution
1656
1657 Examples
1658 --------
1659
1660           t = 4:9;
1661           m = 0:5;
1662           n = 1:6;
1663           [mn, v] = hygestat (t, m, n)
1664
1665           [mn, v] = hygestat (t, m, 2)
1666
1667 References
1668 ----------
1669
1670        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1671           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1672           Chapman & Hall/CRC, 2001.
1673
1674        2. Athanasios Papoulis. `Probability, Random Variables, and
1675           Stochastic Processes'. McGraw-Hill, New York, second edition,
1676           1984.
1677
1678
1679
1680
1681 # name: <cell-element>
1682 # type: sq_string
1683 # elements: 1
1684 # length: 61
1685 Compute mean and variance of the hypergeometric distribution.
1686
1687
1688
1689 # name: <cell-element>
1690 # type: sq_string
1691 # elements: 1
1692 # length: 9
1693 jackknife
1694
1695
1696 # name: <cell-element>
1697 # type: sq_string
1698 # elements: 1
1699 # length: 2008
1700  -- Function File: JACKSTAT = jackknife (E, X, ...)
1701      Compute jackknife estimates of a parameter taking one or more
1702      given samples as parameters.  In particular, E is the estimator to
1703      be jackknifed as a function name, handle, or inline function, and
1704      X is the sample for which the estimate is to be taken.  The I-th
1705      entry of JACKSTAT will contain the value of the estimator on the
1706      sample X with its I-th row omitted.
1707
1708           jackstat(I) = E(X(1 : I - 1, I + 1 : length(X)))
1709
1710      Depending on the number of samples to be used, the estimator must
1711      have the appropriate form: If only one sample is used, then the
1712      estimator need not be concerned with cell arrays, for example
1713      jackknifing the standard deviation of a sample can be performed
1714      with `JACKSTAT = jackknife (@std, rand (100, 1))'.  If, however,
1715      more than one sample is to be used, the samples must all be of
1716      equal size, and the estimator must address them as elements of a
1717      cell-array, in which they are aggregated in their order of
1718      appearance:
1719
1720           JACKSTAT = jackknife(@(x) std(x{1})/var(x{2}), rand (100, 1), randn (100, 1)
1721
1722      If all goes well, a theoretical value P for the parameter is
1723      already known, N is the sample size, `T = N * E(X) - (N - 1) *
1724      mean(JACKSTAT)', and `V = sumsq(N * E(X) - (N - 1) * JACKSTAT - T)
1725      / (N * (N - 1))', then `(T-P)/sqrt(V)' should follow a
1726      t-distribution with N-1 degrees of freedom.
1727
1728      Jackknifing is a well known method to reduce bias; further details
1729      can be found in:
1730         * Rupert G. Miller: The jackknife-a review; Biometrika (1974)
1731           61(1): 1-15; doi:10.1093/biomet/61.1.1
1732
1733         * Rupert G. Miller: Jackknifing Variances; Ann. Math. Statist.
1734           Volume 39, Number 2 (1968), 567-582;
1735           doi:10.1214/aoms/1177698418
1736
1737         * M. H. Quenouille: Notes on Bias in Estimation; Biometrika
1738           Vol. 43, No. 3/4 (Dec., 1956), pp. 353-360;
1739           doi:10.1093/biomet/43.3-4.353
1740
1741
1742
1743
1744 # name: <cell-element>
1745 # type: sq_string
1746 # elements: 1
1747 # length: 80
1748 Compute jackknife estimates of a parameter taking one or more given
1749 samples as p
1750
1751
1752
1753 # name: <cell-element>
1754 # type: sq_string
1755 # elements: 1
1756 # length: 6
1757 jsucdf
1758
1759
1760 # name: <cell-element>
1761 # type: sq_string
1762 # elements: 1
1763 # length: 263
1764  -- Function File:  jsucdf (X, ALPHA1, ALPHA2)
1765      For each element of X, compute the cumulative distribution
1766      function (CDF) at X of the Johnson SU distribution with shape
1767      parameters ALPHA1 and ALPHA2.
1768
1769      Default values are ALPHA1 = 1, ALPHA2 = 1.
1770
1771
1772
1773
1774 # name: <cell-element>
1775 # type: sq_string
1776 # elements: 1
1777 # length: 80
1778 For each element of X, compute the cumulative distribution function
1779 (CDF) at X o
1780
1781
1782
1783 # name: <cell-element>
1784 # type: sq_string
1785 # elements: 1
1786 # length: 6
1787 jsupdf
1788
1789
1790 # name: <cell-element>
1791 # type: sq_string
1792 # elements: 1
1793 # length: 259
1794  -- Function File:  jsupdf (X, ALPHA1, ALPHA2)
1795      For each element of X, compute the probability density function
1796      (PDF) at X of the Johnson SU distribution with shape parameters
1797      ALPHA1 and ALPHA2.
1798
1799      Default values are ALPHA1 = 1, ALPHA2 = 1.
1800
1801
1802
1803
1804 # name: <cell-element>
1805 # type: sq_string
1806 # elements: 1
1807 # length: 80
1808 For each element of X, compute the probability density function (PDF)
1809 at X of th
1810
1811
1812
1813 # name: <cell-element>
1814 # type: sq_string
1815 # elements: 1
1816 # length: 6
1817 kmeans
1818
1819
1820 # name: <cell-element>
1821 # type: sq_string
1822 # elements: 1
1823 # length: 135
1824  -- Function File: [IDX, CENTERS] = kmeans (DATA, K, PARAM1, VALUE1,
1825           ...)
1826      K-means clustering.
1827
1828      See also: linkage
1829
1830
1831
1832
1833
1834 # name: <cell-element>
1835 # type: sq_string
1836 # elements: 1
1837 # length: 19
1838 K-means clustering.
1839
1840
1841
1842 # name: <cell-element>
1843 # type: sq_string
1844 # elements: 1
1845 # length: 7
1846 linkage
1847
1848
1849 # name: <cell-element>
1850 # type: sq_string
1851 # elements: 1
1852 # length: 2933
1853  -- Function File: Y = linkage (D)
1854  -- Function File: Y = linkage (D, METHOD)
1855  -- Function File: Y = linkage (X, METHOD, METRIC)
1856  -- Function File: Y = linkage (X, METHOD, ARGLIST)
1857      Produce a hierarchical clustering dendrogram
1858
1859      D is the dissimilarity matrix relative to N observations,
1860      formatted as a (n-1)*n/2x1 vector as produced by `pdist'.
1861      Alternatively, X contains data formatted for input to `pdist',
1862      METRIC is a metric for `pdist' and ARGLIST is a cell array
1863      containing arguments that are passed to `pdist'.
1864
1865      `linkage' starts by putting each observation into a singleton
1866      cluster and numbering those from 1 to N.  Then it merges two
1867      clusters, chosen according to METHOD, to create a new cluster
1868      numbered N+1, and so on until all observations are grouped into a
1869      single cluster numbered 2*N-1.  Row M of the m-1x3 output matrix
1870      relates to cluster n+m: the first two columns are the numbers of
1871      the two component clusters and column 3 contains their distance.
1872
1873      METHOD defines the way the distance between two clusters is
1874      computed and how they are recomputed when two clusters are merged:
1875
1876     `"single" (default)'
1877           Distance between two clusters is the minimum distance between
1878           two elements belonging each to one cluster.  Produces a
1879           cluster tree known as minimum spanning tree.
1880
1881     `"complete"'
1882           Furthest distance between two elements belonging each to one
1883           cluster.
1884
1885     `"average"'
1886           Unweighted pair group method with averaging (UPGMA).  The
1887           mean distance between all pair of elements each belonging to
1888           one cluster.
1889
1890     `"weighted"'
1891           Weighted pair group method with averaging (WPGMA).  When two
1892           clusters A and B are joined together, the new distance to a
1893           cluster C is the mean between distances A-C and B-C.
1894
1895     `"centroid"'
1896           Unweighted Pair-Group Method using Centroids (UPGMC).
1897           Assumes Euclidean metric.  The distance between cluster
1898           centroids, each centroid being the center of mass of a
1899           cluster.
1900
1901     `"median"'
1902           Weighted pair-group method using centroids (WPGMC).  Assumes
1903           Euclidean metric.  Distance between cluster centroids.  When
1904           two clusters are joined together, the new centroid is the
1905           midpoint between the joined centroids.
1906
1907     `"ward"'
1908           Ward's sum of squared deviations about the group mean (ESS).
1909           Also known as minimum variance or inner squared distance.
1910           Assumes Euclidean metric.  How much the moment of inertia of
1911           the merged cluster exceeds the sum of those of the individual
1912           clusters.
1913
1914      *Reference* Ward, J. H. Hierarchical Grouping to Optimize an
1915      Objective Function J. Am. Statist. Assoc. 1963, 58, 236-244,
1916      `http://iv.slis.indiana.edu/sw/data/ward.pdf'.
1917
1918    See also: pdist, squareform
1919
1920
1921
1922
1923 # name: <cell-element>
1924 # type: sq_string
1925 # elements: 1
1926 # length: 45
1927 Produce a hierarchical clustering dendrogram
1928
1929
1930
1931
1932 # name: <cell-element>
1933 # type: sq_string
1934 # elements: 1
1935 # length: 8
1936 lognstat
1937
1938
1939 # name: <cell-element>
1940 # type: sq_string
1941 # elements: 1
1942 # length: 1035
1943  -- Function File: [M, V] = lognstat (MU, SIGMA)
1944      Compute mean and variance of the lognormal distribution.
1945
1946 Arguments
1947 ---------
1948
1949         * MU is the first parameter of the lognormal distribution
1950
1951         * SIGMA is the second parameter of the lognormal distribution.
1952           SIGMA must be positive or zero
1953      MU and SIGMA must be of common size or one of them must be scalar
1954
1955 Return values
1956 -------------
1957
1958         * M is the mean of the lognormal distribution
1959
1960         * V is the variance of the lognormal distribution
1961
1962 Examples
1963 --------
1964
1965           mu = 0:0.2:1;
1966           sigma = 0.2:0.2:1.2;
1967           [m, v] = lognstat (mu, sigma)
1968
1969           [m, v] = lognstat (0, sigma)
1970
1971 References
1972 ----------
1973
1974        1. Wendy L. Martinez and Angel R. Martinez. `Computational
1975           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
1976           Chapman & Hall/CRC, 2001.
1977
1978        2. Athanasios Papoulis. `Probability, Random Variables, and
1979           Stochastic Processes'. McGraw-Hill, New York, second edition,
1980           1984.
1981
1982
1983
1984
1985 # name: <cell-element>
1986 # type: sq_string
1987 # elements: 1
1988 # length: 56
1989 Compute mean and variance of the lognormal distribution.
1990
1991
1992
1993 # name: <cell-element>
1994 # type: sq_string
1995 # elements: 1
1996 # length: 3
1997 mad
1998
1999
2000 # name: <cell-element>
2001 # type: sq_string
2002 # elements: 1
2003 # length: 767
2004  -- Function File: mad (X)
2005  -- Function File: mad (X, FLAG)
2006  -- Function File: mad (X, FLAG, DIM)
2007      Compute the mean/median absolute deviation of X.
2008
2009      The mean absolute deviation is computed as
2010
2011           mean (abs (X - mean (X)))
2012
2013      and the median absolute deviation is computed as
2014
2015           median (abs (X - median (X)))
2016
2017      Elements of X containing NaN or NA values are ignored during
2018      computations.
2019
2020      If FLAG is 0, the absolute mean deviation is computed, and if FLAG
2021      is 1, the absolute median deviation is computed. By default FLAG
2022      is 0.
2023
2024      This is done along the dimension DIM of X. If this variable is not
2025      given, the mean/median absolute deviation s computed along the
2026      smallest dimension of X.
2027
2028      See also: std
2029
2030
2031
2032
2033
2034 # name: <cell-element>
2035 # type: sq_string
2036 # elements: 1
2037 # length: 48
2038 Compute the mean/median absolute deviation of X.
2039
2040
2041
2042 # name: <cell-element>
2043 # type: sq_string
2044 # elements: 1
2045 # length: 5
2046 mnpdf
2047
2048
2049 # name: <cell-element>
2050 # type: sq_string
2051 # elements: 1
2052 # length: 1643
2053  -- Function File: Y = mnpdf (X, P)
2054      Compute the probability density function of the multinomial
2055      distribution.
2056
2057 Arguments
2058 ---------
2059
2060         * X is vector with a single sample of a multinomial
2061           distribution with parameter P or a matrix of random samples
2062           from multinomial distributions. In the latter case, each row
2063           of X is a sample from a multinomial distribution with the
2064           corresponding row of P being its parameter.
2065
2066         * P is a vector with the probabilities of the categories or a
2067           matrix with each row containing the probabilities of a
2068           multinomial sample.
2069
2070 Return values
2071 -------------
2072
2073         * Y is a vector of probabilites of the random samples X from the
2074           multinomial distribution with corresponding parameter P. The
2075           parameter N of the multinomial distribution is the sum of the
2076           elements of each row of X. The length of Y is the number of
2077           columns of X.  If a row of P does not sum to `1', then the
2078           corresponding element of Y will be `NaN'.
2079
2080 Examples
2081 --------
2082
2083           x = [1, 4, 2];
2084           p = [0.2, 0.5, 0.3];
2085           y = mnpdf (x, p);
2086
2087           x = [1, 4, 2; 1, 0, 9];
2088           p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8];
2089           y = mnpdf (x, p);
2090
2091 References
2092 ----------
2093
2094        1. Wendy L. Martinez and Angel R. Martinez. `Computational
2095           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
2096           Chapman & Hall/CRC, 2001.
2097
2098        2. Merran Evans, Nicholas Hastings and Brian Peacock.
2099           `Statistical Distributions'. pages 134-136, Wiley, New York,
2100           third edition, 2000.
2101
2102
2103
2104
2105 # name: <cell-element>
2106 # type: sq_string
2107 # elements: 1
2108 # length: 73
2109 Compute the probability density function of the multinomial
2110 distribution.
2111
2112
2113
2114 # name: <cell-element>
2115 # type: sq_string
2116 # elements: 1
2117 # length: 5
2118 mnrnd
2119
2120
2121 # name: <cell-element>
2122 # type: sq_string
2123 # elements: 1
2124 # length: 2172
2125  -- Function File: X = mnrnd (N, P)
2126  -- Function File: X = mnrnd (N, P, S)
2127      Generate random samples from the multinomial distribution.
2128
2129 Arguments
2130 ---------
2131
2132         * N is the first parameter of the multinomial distribution. N
2133           can be scalar or a vector containing the number of trials of
2134           each multinomial sample. The elements of N must be
2135           non-negative integers.
2136
2137         * P is the second parameter of the multinomial distribution. P
2138           can be a vector with the probabilities of the categories or a
2139           matrix with each row containing the probabilities of a
2140           multinomial sample. If P has more than one row and N is
2141           non-scalar, then the number of rows of P must match the
2142           number of elements of N.
2143
2144         * S is the number of multinomial samples to be generated. S must
2145           be a non-negative integer. If S is specified, then N must be
2146           scalar and P must be a vector.
2147
2148 Return values
2149 -------------
2150
2151         * X is a matrix of random samples from the multinomial
2152           distribution with corresponding parameters N and P. Each row
2153           corresponds to one multinomial sample. The number of columns,
2154           therefore, corresponds to the number of columns of P. If S is
2155           not specified, then the number of rows of X is the maximum of
2156           the number of elements of N and the number of rows of P. If a
2157           row of P does not sum to `1', then the corresponding row of X
2158           will contain only `NaN' values.
2159
2160 Examples
2161 --------
2162
2163           n = 10;
2164           p = [0.2, 0.5, 0.3];
2165           x = mnrnd (n, p);
2166
2167           n = 10 * ones (3, 1);
2168           p = [0.2, 0.5, 0.3];
2169           x = mnrnd (n, p);
2170
2171           n = (1:2)';
2172           p = [0.2, 0.5, 0.3; 0.1, 0.1, 0.8];
2173           x = mnrnd (n, p);
2174
2175 References
2176 ----------
2177
2178        1. Wendy L. Martinez and Angel R. Martinez. `Computational
2179           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
2180           Chapman & Hall/CRC, 2001.
2181
2182        2. Merran Evans, Nicholas Hastings and Brian Peacock.
2183           `Statistical Distributions'. pages 134-136, Wiley, New York,
2184           third edition, 2000.
2185
2186
2187
2188
2189 # name: <cell-element>
2190 # type: sq_string
2191 # elements: 1
2192 # length: 58
2193 Generate random samples from the multinomial distribution.
2194
2195
2196
2197 # name: <cell-element>
2198 # type: sq_string
2199 # elements: 1
2200 # length: 15
2201 monotone_smooth
2202
2203
2204 # name: <cell-element>
2205 # type: sq_string
2206 # elements: 1
2207 # length: 1745
2208  -- Function File: YY = monotone_smooth (X, Y, H)
2209      Produce a smooth monotone increasing approximation to a sampled
2210      functional dependence y(x) using a kernel method (an Epanechnikov
2211      smoothing kernel is applied to y(x); this is integrated to yield
2212      the monotone increasing form.  See Reference 1 for details.)
2213
2214 Arguments
2215 ---------
2216
2217         * X is a vector of values of the independent variable.
2218
2219         * Y is a vector of values of the dependent variable, of the
2220           same size as X. For best performance, it is recommended that
2221           the Y already be fairly smooth, e.g. by applying a kernel
2222           smoothing to the original values if they are noisy.
2223
2224         * H is the kernel bandwidth to use. If H is not given, a
2225           "reasonable" value is computed.
2226
2227
2228 Return values
2229 -------------
2230
2231         * YY is the vector of smooth monotone increasing function
2232           values at X.
2233
2234
2235 Examples
2236 --------
2237
2238           x = 0:0.1:10;
2239           y = (x .^ 2) + 3 * randn(size(x)); %typically non-monotonic from the added noise
2240           ys = ([y(1) y(1:(end-1))] + y + [y(2:end) y(end)])/3; %crudely smoothed via
2241           moving average, but still typically non-monotonic
2242           yy = monotone_smooth(x, ys); %yy is monotone increasing in x
2243           plot(x, y, '+', x, ys, x, yy)
2244
2245 References
2246 ----------
2247
2248        1. Holger Dette, Natalie Neumeyer and Kay F. Pilz (2006), A
2249           simple nonparametric estimator of a strictly monotone
2250           regression function, `Bernoulli', 12:469-490
2251
2252        2. Regine Scheder (2007), R Package 'monoProc', Version 1.0-6,
2253           `http://cran.r-project.org/web/packages/monoProc/monoProc.pdf'
2254           (The implementation here is based on the monoProc function
2255           mono.1d)
2256
2257
2258
2259
2260 # name: <cell-element>
2261 # type: sq_string
2262 # elements: 1
2263 # length: 80
2264 Produce a smooth monotone increasing approximation to a sampled
2265 functional depen
2266
2267
2268
2269 # name: <cell-element>
2270 # type: sq_string
2271 # elements: 1
2272 # length: 6
2273 mvncdf
2274
2275
2276 # name: <cell-element>
2277 # type: sq_string
2278 # elements: 1
2279 # length: 1188
2280  -- Function File: P = mvncdf (X, MU, SIGMA)
2281  -- Function File:  mvncdf (A, X, MU, SIGMA)
2282  -- Function File: [P, ERR] = mvncdf (...)
2283      Compute the cumulative distribution function of the multivariate
2284      normal distribution.
2285
2286 Arguments
2287 ---------
2288
2289         * X is the upper limit for integration where each row
2290           corresponds to an observation.
2291
2292         * MU is the mean.
2293
2294         * SIGMA is the correlation matrix.
2295
2296         * A is the lower limit for integration where each row
2297           corresponds to an observation. A must have the same size as X.
2298
2299 Return values
2300 -------------
2301
2302         * P is the cumulative distribution at each row of X and A.
2303
2304         * ERR is the estimated error.
2305
2306 Examples
2307 --------
2308
2309           x = [1 2];
2310           mu = [0.5 1.5];
2311           sigma = [1.0 0.5; 0.5 1.0];
2312           p = mvncdf (x, mu, sigma)
2313
2314           a = [-inf 0];
2315           p = mvncdf (a, x, mu, sigma)
2316
2317 References
2318 ----------
2319
2320        1. Alan Genz and Frank Bretz. Numerical Computation of
2321           Multivariate t-Probabilities with Application to Power
2322           Calculation of Multiple Constrasts. `Journal of Statistical
2323           Computation and Simulation', 63, pages 361-378, 1999.
2324
2325
2326
2327
2328 # name: <cell-element>
2329 # type: sq_string
2330 # elements: 1
2331 # length: 80
2332 Compute the cumulative distribution function of the multivariate normal
2333 distribu
2334
2335
2336
2337 # name: <cell-element>
2338 # type: sq_string
2339 # elements: 1
2340 # length: 6
2341 mvnpdf
2342
2343
2344 # name: <cell-element>
2345 # type: sq_string
2346 # elements: 1
2347 # length: 1600
2348  -- Function File: Y = mvnpdf (X)
2349  -- Function File: Y = mvnpdf (X, MU)
2350  -- Function File: Y = mvnpdf (X, MU, SIGMA)
2351      Compute multivariate normal pdf for X given mean MU and covariance
2352      matrix SIGMA.  The dimension of X is D x P, MU is 1 x P and SIGMA
2353      is P x P. The normal pdf is defined as
2354
2355           1/Y^2 = (2 pi)^P |SIGMA| exp { (X-MU)' inv(SIGMA) (X-MU) }
2356
2357      *References*
2358
2359      NIST Engineering Statistics Handbook 6.5.4.2
2360      http://www.itl.nist.gov/div898/handbook/pmc/section5/pmc542.htm
2361
2362      *Algorithm*
2363
2364      Using Cholesky factorization on the positive definite covariance
2365      matrix:
2366
2367           R = chol (SIGMA);
2368
2369      where R'*R = SIGMA. Being upper triangular, the determinant of R
2370      is  trivially the product of the diagonal, and the determinant of
2371      SIGMA is the square of this:
2372
2373           DET = prod (diag (R))^2;
2374
2375      The formula asks for the square root of the determinant, so no
2376      need to square it.
2377
2378      The exponential argument A = X' * inv (SIGMA) * X
2379
2380           A = X' * inv (SIGMA) * X
2381             = X' * inv (R' * R) * X
2382             = X' * inv (R) * inv(R') * X
2383
2384      Given that inv (R') == inv(R)', at least in theory if not
2385      numerically,
2386
2387           A  = (X' / R) * (X'/R)' = sumsq (X'/R)
2388
2389      The interface takes the parameters to the multivariate normal in
2390      columns rather than rows, so we are actually dealing with the
2391      transpose:
2392
2393           A = sumsq (X/r)
2394
2395      and the final result is:
2396
2397           R = chol (SIGMA)
2398           Y = (2*pi)^(-P/2) * exp (-sumsq ((X-MU)/R, 2)/2) / prod (diag (R))
2399
2400      See also: mvncdf, mvnrnd
2401
2402
2403
2404
2405
2406 # name: <cell-element>
2407 # type: sq_string
2408 # elements: 1
2409 # length: 80
2410 Compute multivariate normal pdf for X given mean MU and covariance
2411 matrix SIGMA.
2412
2413
2414
2415 # name: <cell-element>
2416 # type: sq_string
2417 # elements: 1
2418 # length: 6
2419 mvnrnd
2420
2421
2422 # name: <cell-element>
2423 # type: sq_string
2424 # elements: 1
2425 # length: 228
2426  -- Function File: S = mvnrnd (MU, SIGMA)
2427  -- Function File: S = mvnrnd (MU, SIGMA, N)
2428      Draw N random D-dimensional vectors from a multivariate Gaussian
2429      distribution with mean MU(NxD) and covariance matrix SIGMA(DxD).
2430
2431
2432
2433
2434 # name: <cell-element>
2435 # type: sq_string
2436 # elements: 1
2437 # length: 80
2438 Draw N random D-dimensional vectors from a multivariate Gaussian
2439 distribution wi
2440
2441
2442
2443 # name: <cell-element>
2444 # type: sq_string
2445 # elements: 1
2446 # length: 6
2447 mvtcdf
2448
2449
2450 # name: <cell-element>
2451 # type: sq_string
2452 # elements: 1
2453 # length: 1199
2454  -- Function File: P = mvtcdf (X, SIGMA, NU)
2455  -- Function File:  mvtcdf (A, X, SIGMA, NU)
2456  -- Function File: [P, ERR] = mvtcdf (...)
2457      Compute the cumulative distribution function of the multivariate
2458      Student's t distribution.
2459
2460 Arguments
2461 ---------
2462
2463         * X is the upper limit for integration where each row
2464           corresponds to an observation.
2465
2466         * SIGMA is the correlation matrix.
2467
2468         * NU is the degrees of freedom.
2469
2470         * A is the lower limit for integration where each row
2471           corresponds to an observation. A must have the same size as X.
2472
2473 Return values
2474 -------------
2475
2476         * P is the cumulative distribution at each row of X and A.
2477
2478         * ERR is the estimated error.
2479
2480 Examples
2481 --------
2482
2483           x = [1 2];
2484           sigma = [1.0 0.5; 0.5 1.0];
2485           nu = 4;
2486           p = mvtcdf (x, sigma, nu)
2487
2488           a = [-inf 0];
2489           p = mvtcdf (a, x, sigma, nu)
2490
2491 References
2492 ----------
2493
2494        1. Alan Genz and Frank Bretz. Numerical Computation of
2495           Multivariate t-Probabilities with Application to Power
2496           Calculation of Multiple Constrasts. `Journal of Statistical
2497           Computation and Simulation', 63, pages 361-378, 1999.
2498
2499
2500
2501
2502 # name: <cell-element>
2503 # type: sq_string
2504 # elements: 1
2505 # length: 80
2506 Compute the cumulative distribution function of the multivariate
2507 Student's t dis
2508
2509
2510
2511 # name: <cell-element>
2512 # type: sq_string
2513 # elements: 1
2514 # length: 6
2515 mvtrnd
2516
2517
2518 # name: <cell-element>
2519 # type: sq_string
2520 # elements: 1
2521 # length: 1436
2522  -- Function File: X = mvtrnd (SIGMA, NU)
2523  -- Function File: X = mvtrnd (SIGMA, NU, N)
2524      Generate random samples from the multivariate t-distribution.
2525
2526 Arguments
2527 ---------
2528
2529         * SIGMA is the matrix of correlation coefficients. If there are
2530           any non-unit diagonal elements then SIGMA will be normalized.
2531
2532         * NU is the degrees of freedom for the multivariate
2533           t-distribution.  NU must be a vector with the same number of
2534           elements as samples to be generated or be scalar.
2535
2536         * N is the number of rows of the matrix to be generated. N must
2537           be a non-negative integer and corresponds to the number of
2538           samples to be generated.
2539
2540 Return values
2541 -------------
2542
2543         * X is a matrix of random samples from the multivariate
2544           t-distribution with N row samples.
2545
2546 Examples
2547 --------
2548
2549           sigma = [1, 0.5; 0.5, 1];
2550           nu = 3;
2551           n = 10;
2552           x = mvtrnd (sigma, nu, n);
2553
2554           sigma = [1, 0.5; 0.5, 1];
2555           nu = [2; 3];
2556           n = 2;
2557           x = mvtrnd (sigma, nu, 2);
2558
2559 References
2560 ----------
2561
2562        1. Wendy L. Martinez and Angel R. Martinez. `Computational
2563           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
2564           Chapman & Hall/CRC, 2001.
2565
2566        2. Samuel Kotz and Saralees Nadarajah. `Multivariate t
2567           Distributions and Their Applications'. Cambridge University
2568           Press, Cambridge, 2004.
2569
2570
2571
2572
2573 # name: <cell-element>
2574 # type: sq_string
2575 # elements: 1
2576 # length: 61
2577 Generate random samples from the multivariate t-distribution.
2578
2579
2580
2581 # name: <cell-element>
2582 # type: sq_string
2583 # elements: 1
2584 # length: 6
2585 nanmax
2586
2587
2588 # name: <cell-element>
2589 # type: sq_string
2590 # elements: 1
2591 # length: 379
2592  -- Function File: [V, IDX] = nanmax (X)
2593  -- Function File: [V, IDX] = nanmax (X, Y)
2594      Find the maximal element while ignoring NaN values.
2595
2596      `nanmax' is identical to the `max' function except that NaN values
2597      are ignored.  If all values in a column are NaN, the maximum is
2598      returned as NaN rather than [].
2599
2600      See also: max, nansum, nanmin, nanmean, nanmedian
2601
2602
2603
2604
2605
2606 # name: <cell-element>
2607 # type: sq_string
2608 # elements: 1
2609 # length: 51
2610 Find the maximal element while ignoring NaN values.
2611
2612
2613
2614 # name: <cell-element>
2615 # type: sq_string
2616 # elements: 1
2617 # length: 7
2618 nanmean
2619
2620
2621 # name: <cell-element>
2622 # type: sq_string
2623 # elements: 1
2624 # length: 339
2625  -- Function File: V = nanmean (X)
2626  -- Function File: V = nanmean (X, DIM)
2627      Compute the mean value while ignoring NaN values.
2628
2629      `nanmean' is identical to the `mean' function except that NaN
2630      values are ignored.  If all values are NaN, the mean is returned
2631      as NaN.
2632
2633      See also: mean, nanmin, nanmax, nansum, nanmedian
2634
2635
2636
2637
2638
2639 # name: <cell-element>
2640 # type: sq_string
2641 # elements: 1
2642 # length: 49
2643 Compute the mean value while ignoring NaN values.
2644
2645
2646
2647 # name: <cell-element>
2648 # type: sq_string
2649 # elements: 1
2650 # length: 9
2651 nanmedian
2652
2653
2654 # name: <cell-element>
2655 # type: sq_string
2656 # elements: 1
2657 # length: 355
2658  -- Function File: V = nanmedian (X)
2659  -- Function File: V = nanmedian (X, DIM)
2660      Compute the median of data while ignoring NaN values.
2661
2662      This function is identical to the `median' function except that
2663      NaN values are ignored.  If all values are NaN, the median is
2664      returned as NaN.
2665
2666      See also: median, nanmin, nanmax, nansum, nanmean
2667
2668
2669
2670
2671
2672 # name: <cell-element>
2673 # type: sq_string
2674 # elements: 1
2675 # length: 53
2676 Compute the median of data while ignoring NaN values.
2677
2678
2679
2680 # name: <cell-element>
2681 # type: sq_string
2682 # elements: 1
2683 # length: 6
2684 nanmin
2685
2686
2687 # name: <cell-element>
2688 # type: sq_string
2689 # elements: 1
2690 # length: 379
2691  -- Function File: [V, IDX] = nanmin (X)
2692  -- Function File: [V, IDX] = nanmin (X, Y)
2693      Find the minimal element while ignoring NaN values.
2694
2695      `nanmin' is identical to the `min' function except that NaN values
2696      are ignored.  If all values in a column are NaN, the minimum is
2697      returned as NaN rather than [].
2698
2699      See also: min, nansum, nanmax, nanmean, nanmedian
2700
2701
2702
2703
2704
2705 # name: <cell-element>
2706 # type: sq_string
2707 # elements: 1
2708 # length: 51
2709 Find the minimal element while ignoring NaN values.
2710
2711
2712
2713 # name: <cell-element>
2714 # type: sq_string
2715 # elements: 1
2716 # length: 6
2717 nanstd
2718
2719
2720 # name: <cell-element>
2721 # type: sq_string
2722 # elements: 1
2723 # length: 932
2724  -- Function File: V = nanstd (X)
2725  -- Function File: V = nanstd (X, OPT)
2726  -- Function File: V = nanstd (X, OPT, DIM)
2727      Compute the standard deviation while ignoring NaN values.
2728
2729      `nanstd' is identical to the `std' function except that NaN values
2730      are ignored.  If all values are NaN, the standard deviation is
2731      returned as NaN.  If there is only a single non-NaN value, the
2732      deviation is returned as 0.
2733
2734      The argument OPT determines the type of normalization to use.
2735      Valid values are
2736
2737     0:
2738           normalizes with N-1, provides the square root of best
2739           unbiased estimator of   the variance [default]
2740
2741     1:
2742           normalizes with N, this provides the square root of the
2743           second moment around   the mean
2744
2745      The third argument DIM determines the dimension along which the
2746      standard deviation is calculated.
2747
2748      See also: std, nanmin, nanmax, nansum, nanmedian, nanmean
2749
2750
2751
2752
2753
2754 # name: <cell-element>
2755 # type: sq_string
2756 # elements: 1
2757 # length: 57
2758 Compute the standard deviation while ignoring NaN values.
2759
2760
2761
2762 # name: <cell-element>
2763 # type: sq_string
2764 # elements: 1
2765 # length: 6
2766 nansum
2767
2768
2769 # name: <cell-element>
2770 # type: sq_string
2771 # elements: 1
2772 # length: 345
2773  -- Function File: V = nansum (X)
2774  -- Function File: V = nansum (X, DIM)
2775      Compute the sum while ignoring NaN values.
2776
2777      `nansum' is identical to the `sum' function except that NaN values
2778      are treated as 0 and so ignored.  If all values are NaN, the sum is
2779      returned as 0.
2780
2781      See also: sum, nanmin, nanmax, nanmean, nanmedian
2782
2783
2784
2785
2786
2787 # name: <cell-element>
2788 # type: sq_string
2789 # elements: 1
2790 # length: 42
2791 Compute the sum while ignoring NaN values.
2792
2793
2794
2795 # name: <cell-element>
2796 # type: sq_string
2797 # elements: 1
2798 # length: 6
2799 nanvar
2800
2801
2802 # name: <cell-element>
2803 # type: sq_string
2804 # elements: 1
2805 # length: 783
2806  -- Function File:  nanvar (X)
2807  -- Function File: V = nanvar (X, OPT)
2808  -- Function File: V = nanvar (X, OPT, DIM)
2809      Compute the variance while ignoring NaN values.
2810
2811      For vector arguments, return the (real) variance of the values.
2812      For matrix arguments, return a row vector containing the variance
2813      for each column.
2814
2815      The argument OPT determines the type of normalization to use.
2816      Valid values are
2817
2818     0:
2819           Normalizes with N-1, provides the best unbiased estimator of
2820           the variance [default].
2821
2822     1:
2823           Normalizes with N, this provides the second moment around the
2824           mean.
2825
2826      The third argument DIM determines the dimension along which the
2827      variance is calculated.
2828
2829      See also: var, nanmean, nanstd, nanmax, nanmin
2830
2831
2832
2833
2834
2835 # name: <cell-element>
2836 # type: sq_string
2837 # elements: 1
2838 # length: 47
2839 Compute the variance while ignoring NaN values.
2840
2841
2842
2843 # name: <cell-element>
2844 # type: sq_string
2845 # elements: 1
2846 # length: 8
2847 nbinstat
2848
2849
2850 # name: <cell-element>
2851 # type: sq_string
2852 # elements: 1
2853 # length: 1106
2854  -- Function File: [M, V] = nbinstat (N, P)
2855      Compute mean and variance of the negative binomial distribution.
2856
2857 Arguments
2858 ---------
2859
2860         * N is the first parameter of the negative binomial
2861           distribution. The elements of N must be natural numbers
2862
2863         * P is the second parameter of the negative binomial
2864           distribution. The elements of P must be probabilities
2865      N and P must be of common size or one of them must be scalar
2866
2867 Return values
2868 -------------
2869
2870         * M is the mean of the negative binomial distribution
2871
2872         * V is the variance of the negative binomial distribution
2873
2874 Examples
2875 --------
2876
2877           n = 1:4;
2878           p = 0.2:0.2:0.8;
2879           [m, v] = nbinstat (n, p)
2880
2881           [m, v] = nbinstat (n, 0.5)
2882
2883 References
2884 ----------
2885
2886        1. Wendy L. Martinez and Angel R. Martinez. `Computational
2887           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
2888           Chapman & Hall/CRC, 2001.
2889
2890        2. Athanasios Papoulis. `Probability, Random Variables, and
2891           Stochastic Processes'. McGraw-Hill, New York, second edition,
2892           1984.
2893
2894
2895
2896
2897 # name: <cell-element>
2898 # type: sq_string
2899 # elements: 1
2900 # length: 64
2901 Compute mean and variance of the negative binomial distribution.
2902
2903
2904
2905 # name: <cell-element>
2906 # type: sq_string
2907 # elements: 1
2908 # length: 22
2909 normalise_distribution
2910
2911
2912 # name: <cell-element>
2913 # type: sq_string
2914 # elements: 1
2915 # length: 2097
2916  -- Function File: NORMALISED = normalise_distribution (DATA)
2917  -- Function File: NORMALISED = normalise_distribution (DATA,
2918           DISTRIBUTION)
2919  -- Function File: NORMALISED = normalise_distribution (DATA,
2920           DISTRIBUTION, DIMENSION)
2921      Transform a set of data so as to be N(0,1) distributed according
2922      to an idea by van Albada and Robinson.  This is achieved by first
2923      passing it through its own cumulative distribution function (CDF)
2924      in order to get a uniform distribution, and then mapping the
2925      uniform to a normal distribution.  The data must be passed as a
2926      vector or matrix in DATA.  If the CDF is unknown, then [] can be
2927      passed in DISTRIBUTION, and in this case the empirical CDF will be
2928      used.  Otherwise, if the CDFs for all data are known, they can be
2929      passed in DISTRIBUTION, either in the form of a single function
2930      name as a string, or a single function handle, or a cell array
2931      consisting of either all function names as strings, or all
2932      function handles.  In the latter case, the number of CDFs passed
2933      must match the number of rows, or columns respectively, to
2934      normalise.  If the data are passed as a matrix, then the
2935      transformation will operate either along the first non-singleton
2936      dimension, or along DIMENSION if present.
2937
2938      Notes: The empirical CDF will map any two sets of data having the
2939      same size and their ties in the same places after sorting to some
2940      permutation of the same normalised data:
2941           `normalise_distribution([1 2 2 3 4])'
2942           => -1.28  0.00  0.00  0.52  1.28
2943
2944           `normalise_distribution([1 10 100 10 1000])'
2945           => -1.28  0.00  0.52  0.00  1.28
2946
2947      Original source: S.J. van Albada, P.A. Robinson "Transformation of
2948      arbitrary distributions to the normal distribution with
2949      application to EEG test-retest reliability" Journal of
2950      Neuroscience Methods, Volume 161, Issue 2, 15 April 2007, Pages
2951      205-211 ISSN 0165-0270, 10.1016/j.jneumeth.2006.11.004.
2952      (http://www.sciencedirect.com/science/article/pii/S0165027006005668)
2953
2954
2955
2956
2957 # name: <cell-element>
2958 # type: sq_string
2959 # elements: 1
2960 # length: 80
2961 Transform a set of data so as to be N(0,1) distributed according to an
2962 idea by v
2963
2964
2965
2966 # name: <cell-element>
2967 # type: sq_string
2968 # elements: 1
2969 # length: 8
2970 normplot
2971
2972
2973 # name: <cell-element>
2974 # type: sq_string
2975 # elements: 1
2976 # length: 445
2977  -- Function File: normplot (X)
2978      Produce a normal probability plot for each column of X.
2979
2980      The line joing the 1st and 3rd quantile is drawn on the graph.  If
2981      the underlying distribution is normal, the points will cluster
2982      around this line.
2983
2984      Note that this function sets the title, xlabel, ylabel, axis,
2985      grid, tics and hold properties of the graph.  These need to be
2986      cleared before subsequent graphs using 'clf'.
2987
2988
2989
2990
2991 # name: <cell-element>
2992 # type: sq_string
2993 # elements: 1
2994 # length: 55
2995 Produce a normal probability plot for each column of X.
2996
2997
2998
2999 # name: <cell-element>
3000 # type: sq_string
3001 # elements: 1
3002 # length: 8
3003 normstat
3004
3005
3006 # name: <cell-element>
3007 # type: sq_string
3008 # elements: 1
3009 # length: 967
3010  -- Function File: [MN, V] = normstat (M, S)
3011      Compute mean and variance of the normal distribution.
3012
3013 Arguments
3014 ---------
3015
3016         * M is the mean of the normal distribution
3017
3018         * S is the standard deviation of the normal distribution.  S
3019           must be positive
3020      M and S must be of common size or one of them must be scalar
3021
3022 Return values
3023 -------------
3024
3025         * MN is the mean of the normal distribution
3026
3027         * V is the variance of the normal distribution
3028
3029 Examples
3030 --------
3031
3032           m = 1:6;
3033           s = 0:0.2:1;
3034           [mn, v] = normstat (m, s)
3035
3036           [mn, v] = normstat (0, s)
3037
3038 References
3039 ----------
3040
3041        1. Wendy L. Martinez and Angel R. Martinez. `Computational
3042           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
3043           Chapman & Hall/CRC, 2001.
3044
3045        2. Athanasios Papoulis. `Probability, Random Variables, and
3046           Stochastic Processes'. McGraw-Hill, New York, second edition,
3047           1984.
3048
3049
3050
3051
3052 # name: <cell-element>
3053 # type: sq_string
3054 # elements: 1
3055 # length: 53
3056 Compute mean and variance of the normal distribution.
3057
3058
3059
3060 # name: <cell-element>
3061 # type: sq_string
3062 # elements: 1
3063 # length: 5
3064 pdist
3065
3066
3067 # name: <cell-element>
3068 # type: sq_string
3069 # elements: 1
3070 # length: 2477
3071  -- Function File: Y = pdist (X)
3072  -- Function File: Y = pdist (X, METRIC)
3073  -- Function File: Y = pdist (X, METRIC, METRICARG, ...)
3074      Return the distance between any two rows in X.
3075
3076      X is the NxD matrix representing Q row vectors of size D.
3077
3078      The output is a dissimilarity matrix formatted as a row vector Y,
3079      (n-1)*n/2 long, where the distances are in the order [(1, 2) (1,
3080      3) ... (2, 3) ... (n-1, n)].  You can use the `squareform'
3081      function to display the distances between the vectors arranged
3082      into an NxN matrix.
3083
3084      `metric' is an optional argument specifying how the distance is
3085      computed. It can be any of the following ones, defaulting to
3086      "euclidean", or a user defined function that takes two arguments X
3087      and Y plus any number of optional arguments, where X is a row
3088      vector and and Y is a matrix having the same number of columns as
3089      X.  `metric' returns a column vector where row I is the distance
3090      between X and row I of Y. Any additional arguments after the
3091      `metric' are passed as metric (X, Y, METRICARG1, METRICARG2 ...).
3092
3093      Predefined distance functions are:
3094
3095     `"euclidean"'
3096           Euclidean distance (default).
3097
3098     `"seuclidean"'
3099           Standardized Euclidean distance. Each coordinate in the sum of
3100           squares is inverse weighted by the sample variance of that
3101           coordinate.
3102
3103     `"mahalanobis"'
3104           Mahalanobis distance: see the function mahalanobis.
3105
3106     `"cityblock"'
3107           City Block metric, aka Manhattan distance.
3108
3109     `"minkowski"'
3110           Minkowski metric.  Accepts a numeric parameter P: for P=1
3111           this is the same as the cityblock metric, with P=2 (default)
3112           it is equal to the euclidean metric.
3113
3114     `"cosine"'
3115           One minus the cosine of the included angle between rows, seen
3116           as vectors.
3117
3118     `"correlation"'
3119           One minus the sample correlation between points (treated as
3120           sequences of values).
3121
3122     `"spearman"'
3123           One minus the sample Spearman's rank correlation between
3124           observations, treated as sequences of values.
3125
3126     `"hamming"'
3127           Hamming distance: the quote of the number of coordinates that
3128           differ.
3129
3130     `"jaccard"'
3131           One minus the Jaccard coefficient, the quote of nonzero
3132           coordinates that differ.
3133
3134     `"chebychev"'
3135           Chebychev distance: the maximum coordinate difference.
3136
3137      See also: linkage, mahalanobis, squareform
3138
3139
3140
3141
3142
3143 # name: <cell-element>
3144 # type: sq_string
3145 # elements: 1
3146 # length: 46
3147 Return the distance between any two rows in X.
3148
3149
3150
3151 # name: <cell-element>
3152 # type: sq_string
3153 # elements: 1
3154 # length: 8
3155 poisstat
3156
3157
3158 # name: <cell-element>
3159 # type: sq_string
3160 # elements: 1
3161 # length: 820
3162  -- Function File: [M, V] = poisstat (LAMBDA)
3163      Compute mean and variance of the Poisson distribution.
3164
3165 Arguments
3166 ---------
3167
3168         * LAMBDA is the parameter of the Poisson distribution. The
3169           elements of LAMBDA must be positive
3170
3171 Return values
3172 -------------
3173
3174         * M is the mean of the Poisson distribution
3175
3176         * V is the variance of the Poisson distribution
3177
3178 Example
3179 -------
3180
3181           lambda = 1 ./ (1:6);
3182           [m, v] = poisstat (lambda)
3183
3184 References
3185 ----------
3186
3187        1. Wendy L. Martinez and Angel R. Martinez. `Computational
3188           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
3189           Chapman & Hall/CRC, 2001.
3190
3191        2. Athanasios Papoulis. `Probability, Random Variables, and
3192           Stochastic Processes'. McGraw-Hill, New York, second edition,
3193           1984.
3194
3195
3196
3197
3198 # name: <cell-element>
3199 # type: sq_string
3200 # elements: 1
3201 # length: 54
3202 Compute mean and variance of the Poisson distribution.
3203
3204
3205
3206 # name: <cell-element>
3207 # type: sq_string
3208 # elements: 1
3209 # length: 8
3210 princomp
3211
3212
3213 # name: <cell-element>
3214 # type: sq_string
3215 # elements: 1
3216 # length: 332
3217  -- Function File: [PC, Z, W, TSQ] = princomp (X)
3218      Compute principal components of X.
3219
3220      The first output argument PC is the principal components of X.
3221      The second Z is the transformed data, and W is the eigenvalues of
3222      the covariance matrix of X. TSQ is the Hotelling's T^2 statistic
3223      for the transformed data.
3224
3225
3226
3227
3228 # name: <cell-element>
3229 # type: sq_string
3230 # elements: 1
3231 # length: 34
3232 Compute principal components of X.
3233
3234
3235
3236 # name: <cell-element>
3237 # type: sq_string
3238 # elements: 1
3239 # length: 6
3240 random
3241
3242
3243 # name: <cell-element>
3244 # type: sq_string
3245 # elements: 1
3246 # length: 3107
3247  -- Function File: R = random(NAME, ARG1)
3248  -- Function File: R = random(NAME, ARG1, ARG2)
3249  -- Function File: R = random(NAME, ARG1, ARG2, ARG3)
3250  -- Function File: R = random(NAME, ..., S1, ...)
3251      Generates pseudo-random numbers from a given one-, two-, or
3252      three-parameter distribution.
3253
3254      The variable NAME must be a string that names the distribution from
3255      which to sample.  If this distribution is a one-parameter
3256      distribution ARG1 should be supplied, if it is a two-paramter
3257      distribution ARG2 must also be supplied, and if it is a
3258      three-parameter distribution ARG3 must also be present.  Any
3259      arguments following the distribution paramters will determine the
3260      size of the result.
3261
3262      As an example, the following code generates a 10 by 20 matrix
3263      containing random numbers from a normal distribution with mean 5
3264      and standard deviation 2.
3265           R = random("normal", 5, 2, [10, 20]);
3266
3267      The variable NAME can be one of the following strings
3268
3269     "beta"
3270     "beta distribution"
3271           Samples are drawn from the Beta distribution.
3272
3273     "bino"
3274     "binomial"
3275     "binomial distribution"
3276           Samples are drawn from the Binomial distribution.
3277
3278     "chi2"
3279     "chi-square"
3280     "chi-square distribution"
3281           Samples are drawn from the Chi-Square distribution.
3282
3283     "exp"
3284     "exponential"
3285     "exponential distribution"
3286           Samples are drawn from the Exponential distribution.
3287
3288     "f"
3289     "f distribution"
3290           Samples are drawn from the F distribution.
3291
3292     "gam"
3293     "gamma"
3294     "gamma distribution"
3295           Samples are drawn from the Gamma distribution.
3296
3297     "geo"
3298     "geometric"
3299     "geometric distribution"
3300           Samples are drawn from the Geometric distribution.
3301
3302     "hyge"
3303     "hypergeometric"
3304     "hypergeometric distribution"
3305           Samples are drawn from the Hypergeometric distribution.
3306
3307     "logn"
3308     "lognormal"
3309     "lognormal distribution"
3310           Samples are drawn from the Log-Normal distribution.
3311
3312     "nbin"
3313     "negative binomial"
3314     "negative binomial distribution"
3315           Samples are drawn from the Negative Binomial distribution.
3316
3317     "norm"
3318     "normal"
3319     "normal distribution"
3320           Samples are drawn from the Normal distribution.
3321
3322     "poiss"
3323     "poisson"
3324     "poisson distribution"
3325           Samples are drawn from the Poisson distribution.
3326
3327     "rayl"
3328     "rayleigh"
3329     "rayleigh distribution"
3330           Samples are drawn from the Rayleigh distribution.
3331
3332     "t"
3333     "t distribution"
3334           Samples are drawn from the T distribution.
3335
3336     "unif"
3337     "uniform"
3338     "uniform distribution"
3339           Samples are drawn from the Uniform distribution.
3340
3341     "unid"
3342     "discrete uniform"
3343     "discrete uniform distribution"
3344           Samples are drawn from the Uniform Discrete distribution.
3345
3346     "wbl"
3347     "weibull"
3348     "weibull distribution"
3349           Samples are drawn from the Weibull distribution.
3350
3351      See also: rand, betarnd, binornd, chi2rnd, exprnd, frnd, gamrnd,
3352      geornd, hygernd, lognrnd, nbinrnd, normrnd, poissrnd, raylrnd,
3353      trnd, unifrnd, unidrnd, wblrnd
3354
3355
3356
3357
3358
3359 # name: <cell-element>
3360 # type: sq_string
3361 # elements: 1
3362 # length: 80
3363 Generates pseudo-random numbers from a given one-, two-, or
3364 three-parameter dist
3365
3366
3367
3368 # name: <cell-element>
3369 # type: sq_string
3370 # elements: 1
3371 # length: 7
3372 raylcdf
3373
3374
3375 # name: <cell-element>
3376 # type: sq_string
3377 # elements: 1
3378 # length: 1076
3379  -- Function File: P = raylcdf (X, SIGMA)
3380      Compute the cumulative distribution function of the Rayleigh
3381      distribution.
3382
3383 Arguments
3384 ---------
3385
3386         * X is the support. The elements of X must be non-negative.
3387
3388         * SIGMA is the parameter of the Rayleigh distribution. The
3389           elements of SIGMA must be positive.
3390      X and SIGMA must be of common size or one of them must be scalar.
3391
3392 Return values
3393 -------------
3394
3395         * P is the cumulative distribution of the Rayleigh distribution
3396           at each element of X and corresponding parameter SIGMA.
3397
3398 Examples
3399 --------
3400
3401           x = 0:0.5:2.5;
3402           sigma = 1:6;
3403           p = raylcdf (x, sigma)
3404
3405           p = raylcdf (x, 0.5)
3406
3407 References
3408 ----------
3409
3410        1. Wendy L. Martinez and Angel R. Martinez. `Computational
3411           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
3412           Chapman & Hall/CRC, 2001.
3413
3414        2. Athanasios Papoulis. `Probability, Random Variables, and
3415           Stochastic Processes'. pages 104 and 148, McGraw-Hill, New
3416           York, second edition, 1984.
3417
3418
3419
3420
3421 # name: <cell-element>
3422 # type: sq_string
3423 # elements: 1
3424 # length: 74
3425 Compute the cumulative distribution function of the Rayleigh
3426 distribution.
3427
3428
3429
3430 # name: <cell-element>
3431 # type: sq_string
3432 # elements: 1
3433 # length: 7
3434 raylinv
3435
3436
3437 # name: <cell-element>
3438 # type: sq_string
3439 # elements: 1
3440 # length: 1133
3441  -- Function File: X = raylinv (P, SIGMA)
3442      Compute the quantile of the Rayleigh distribution. The quantile is
3443      the inverse of the cumulative distribution function.
3444
3445 Arguments
3446 ---------
3447
3448         * P is the cumulative distribution. The elements of P must be
3449           probabilities.
3450
3451         * SIGMA is the parameter of the Rayleigh distribution. The
3452           elements of SIGMA must be positive.
3453      P and SIGMA must be of common size or one of them must be scalar.
3454
3455 Return values
3456 -------------
3457
3458         * X is the quantile of the Rayleigh distribution at each
3459           element of P and corresponding parameter SIGMA.
3460
3461 Examples
3462 --------
3463
3464           p = 0:0.1:0.5;
3465           sigma = 1:6;
3466           x = raylinv (p, sigma)
3467
3468           x = raylinv (p, 0.5)
3469
3470 References
3471 ----------
3472
3473        1. Wendy L. Martinez and Angel R. Martinez. `Computational
3474           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
3475           Chapman & Hall/CRC, 2001.
3476
3477        2. Athanasios Papoulis. `Probability, Random Variables, and
3478           Stochastic Processes'. pages 104 and 148, McGraw-Hill, New
3479           York, second edition, 1984.
3480
3481
3482
3483
3484 # name: <cell-element>
3485 # type: sq_string
3486 # elements: 1
3487 # length: 50
3488 Compute the quantile of the Rayleigh distribution.
3489
3490
3491
3492 # name: <cell-element>
3493 # type: sq_string
3494 # elements: 1
3495 # length: 7
3496 raylpdf
3497
3498
3499 # name: <cell-element>
3500 # type: sq_string
3501 # elements: 1
3502 # length: 1068
3503  -- Function File: Y = raylpdf (X, SIGMA)
3504      Compute the probability density function of the Rayleigh
3505      distribution.
3506
3507 Arguments
3508 ---------
3509
3510         * X is the support. The elements of X must be non-negative.
3511
3512         * SIGMA is the parameter of the Rayleigh distribution. The
3513           elements of SIGMA must be positive.
3514      X and SIGMA must be of common size or one of them must be scalar.
3515
3516 Return values
3517 -------------
3518
3519         * Y is the probability density of the Rayleigh distribution at
3520           each element of X and corresponding parameter SIGMA.
3521
3522 Examples
3523 --------
3524
3525           x = 0:0.5:2.5;
3526           sigma = 1:6;
3527           y = raylpdf (x, sigma)
3528
3529           y = raylpdf (x, 0.5)
3530
3531 References
3532 ----------
3533
3534        1. Wendy L. Martinez and Angel R. Martinez. `Computational
3535           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
3536           Chapman & Hall/CRC, 2001.
3537
3538        2. Athanasios Papoulis. `Probability, Random Variables, and
3539           Stochastic Processes'. pages 104 and 148, McGraw-Hill, New
3540           York, second edition, 1984.
3541
3542
3543
3544
3545 # name: <cell-element>
3546 # type: sq_string
3547 # elements: 1
3548 # length: 70
3549 Compute the probability density function of the Rayleigh distribution.
3550
3551
3552
3553 # name: <cell-element>
3554 # type: sq_string
3555 # elements: 1
3556 # length: 7
3557 raylrnd
3558
3559
3560 # name: <cell-element>
3561 # type: sq_string
3562 # elements: 1
3563 # length: 1489
3564  -- Function File: X = raylrnd (SIGMA)
3565  -- Function File: X = raylrnd (SIGMA, SZ)
3566  -- Function File: X = raylrnd (SIGMA, R, C)
3567      Generate a matrix of random samples from the Rayleigh distribution.
3568
3569 Arguments
3570 ---------
3571
3572         * SIGMA is the parameter of the Rayleigh distribution. The
3573           elements of SIGMA must be positive.
3574
3575         * SZ is the size of the matrix to be generated. SZ must be a
3576           vector of non-negative integers.
3577
3578         * R is the number of rows of the matrix to be generated. R must
3579           be a non-negative integer.
3580
3581         * C is the number of columns of the matrix to be generated. C
3582           must be a non-negative integer.
3583
3584 Return values
3585 -------------
3586
3587         * X is a matrix of random samples from the Rayleigh
3588           distribution with corresponding parameter SIGMA. If neither
3589           SZ nor R and C are specified, then X is of the same size as
3590           SIGMA.
3591
3592 Examples
3593 --------
3594
3595           sigma = 1:6;
3596           x = raylrnd (sigma)
3597
3598           sz = [2, 3];
3599           x = raylrnd (0.5, sz)
3600
3601           r = 2;
3602           c = 3;
3603           x = raylrnd (0.5, r, c)
3604
3605 References
3606 ----------
3607
3608        1. Wendy L. Martinez and Angel R. Martinez. `Computational
3609           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
3610           Chapman & Hall/CRC, 2001.
3611
3612        2. Athanasios Papoulis. `Probability, Random Variables, and
3613           Stochastic Processes'. pages 104 and 148, McGraw-Hill, New
3614           York, second edition, 1984.
3615
3616
3617
3618
3619 # name: <cell-element>
3620 # type: sq_string
3621 # elements: 1
3622 # length: 67
3623 Generate a matrix of random samples from the Rayleigh distribution.
3624
3625
3626
3627 # name: <cell-element>
3628 # type: sq_string
3629 # elements: 1
3630 # length: 8
3631 raylstat
3632
3633
3634 # name: <cell-element>
3635 # type: sq_string
3636 # elements: 1
3637 # length: 815
3638  -- Function File: [M, V] = raylstat (SIGMA)
3639      Compute mean and variance of the Rayleigh distribution.
3640
3641 Arguments
3642 ---------
3643
3644         * SIGMA is the parameter of the Rayleigh distribution. The
3645           elements of SIGMA must be positive.
3646
3647 Return values
3648 -------------
3649
3650         * M is the mean of the Rayleigh distribution.
3651
3652         * V is the variance of the Rayleigh distribution.
3653
3654 Example
3655 -------
3656
3657           sigma = 1:6;
3658           [m, v] = raylstat (sigma)
3659
3660 References
3661 ----------
3662
3663        1. Wendy L. Martinez and Angel R. Martinez. `Computational
3664           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
3665           Chapman & Hall/CRC, 2001.
3666
3667        2. Athanasios Papoulis. `Probability, Random Variables, and
3668           Stochastic Processes'. McGraw-Hill, New York, second edition,
3669           1984.
3670
3671
3672
3673
3674 # name: <cell-element>
3675 # type: sq_string
3676 # elements: 1
3677 # length: 55
3678 Compute mean and variance of the Rayleigh distribution.
3679
3680
3681
3682 # name: <cell-element>
3683 # type: sq_string
3684 # elements: 1
3685 # length: 7
3686 regress
3687
3688
3689 # name: <cell-element>
3690 # type: sq_string
3691 # elements: 1
3692 # length: 1333
3693  -- Function File: [B, BINT, R, RINT, STATS] = regress (Y, X, [ALPHA])
3694      Multiple Linear Regression using Least Squares Fit of Y on X with
3695      the model `y = X * beta + e'.
3696
3697      Here,
3698
3699         * `y' is a column vector of observed values
3700
3701         * `X' is a matrix of regressors, with the first column filled
3702           with the constant value 1
3703
3704         * `beta' is a column vector of regression parameters
3705
3706         * `e' is a column vector of random errors
3707
3708      Arguments are
3709
3710         * Y is the `y' in the model
3711
3712         * X is the `X' in the model
3713
3714         * ALPHA is the significance level used to calculate the
3715           confidence intervals BINT and RINT (see `Return values'
3716           below). If not specified, ALPHA defaults to 0.05
3717
3718      Return values are
3719
3720         * B is the `beta' in the model
3721
3722         * BINT is the confidence interval for B
3723
3724         * R is a column vector of residuals
3725
3726         * RINT is the confidence interval for R
3727
3728         * STATS is a row vector containing:
3729
3730              * The R^2 statistic
3731
3732              * The F statistic
3733
3734              * The p value for the full model
3735
3736              * The estimated error variance
3737
3738      R and RINT can be passed to `rcoplot' to visualize the residual
3739      intervals and identify outliers.
3740
3741      NaN values in Y and X are removed before calculation begins.
3742
3743
3744
3745
3746
3747 # name: <cell-element>
3748 # type: sq_string
3749 # elements: 1
3750 # length: 80
3751 Multiple Linear Regression using Least Squares Fit of Y on X with the
3752 model `y =
3753
3754
3755
3756 # name: <cell-element>
3757 # type: sq_string
3758 # elements: 1
3759 # length: 8
3760 repanova
3761
3762
3763 # name: <cell-element>
3764 # type: sq_string
3765 # elements: 1
3766 # length: 696
3767  -- Function File: [PVAL, TABLE, ST] = repanova (X, COND)
3768  -- Function File: [PVAL, TABLE, ST] = repanova (X, COND, ['string' |
3769           'cell'])
3770      Perform a repeated measures analysis of variance (Repeated ANOVA).
3771      X is formated such that each row is a subject and each column is a
3772      condition.
3773
3774      condition is typically a point in time, say t=1 then t=2, etc
3775      condition can also be thought of as groups.
3776
3777      The optional flag can be either 'cell' or 'string' and reflects
3778      the format of the table returned.  Cell is the default.
3779
3780      NaNs are ignored using nanmean and nanstd.
3781
3782      This fuction does not currently support multiple columns of the
3783      same condition!
3784
3785
3786
3787
3788 # name: <cell-element>
3789 # type: sq_string
3790 # elements: 1
3791 # length: 66
3792 Perform a repeated measures analysis of variance (Repeated ANOVA).
3793
3794
3795
3796 # name: <cell-element>
3797 # type: sq_string
3798 # elements: 1
3799 # length: 10
3800 squareform
3801
3802
3803 # name: <cell-element>
3804 # type: sq_string
3805 # elements: 1
3806 # length: 384
3807  -- Function File: Y = squareform (X)
3808  -- Function File: Y = squareform (X, "tovector")
3809  -- Function File: Y = squareform (X, "tomatrix")
3810      Convert a vector from the pdist function into a square matrix or
3811      from a square matrix back to the vector form.
3812
3813      The second argument is used to specify the output type in case
3814      there is a single element.
3815
3816      See also: pdist
3817
3818
3819
3820
3821
3822 # name: <cell-element>
3823 # type: sq_string
3824 # elements: 1
3825 # length: 80
3826 Convert a vector from the pdist function into a square matrix or from a
3827 square m
3828
3829
3830
3831 # name: <cell-element>
3832 # type: sq_string
3833 # elements: 1
3834 # length: 8
3835 tabulate
3836
3837
3838 # name: <cell-element>
3839 # type: sq_string
3840 # elements: 1
3841 # length: 1886
3842  -- Function File: TABLE = tabulate (DATA, EDGES)
3843      Compute a frequency table.
3844
3845      For vector data, the function counts the number of values in data
3846      that fall between the elements in the edges vector (which must
3847      contain monotonically non-decreasing values). TABLE is a matrix.
3848      The first column of TABLE is the number of bin, the second is the
3849      number of instances in each class (absolute frequency). The third
3850      column contains the percentage of each value (relative frequency)
3851      and the fourth column contains the cumulative frequency.
3852
3853      If EDGES is missed the width of each class is unitary, if EDGES is
3854      a scalar then represent the number of classes, or you can define
3855      the width of each bin.  TABLE(K, 2) will count the value DATA (I)
3856      if EDGES (K) <= DATA (I) < EDGES (K+1).  The  last bin will count
3857      the value of DATA (I) if EDGES(K) <= DATA (I) <=  EDGES (K+1).
3858      Values outside the values in EDGES are not counted.  Use -inf and
3859      inf in EDGES to include all values.  Tabulate with no output
3860      arguments returns a formatted table in the command window.
3861
3862      Example
3863
3864           sphere_radius = [1:0.05:2.5];
3865           tabulate (sphere_radius)
3866
3867      Tabulate returns 2 bins, the first contains the sphere with radius
3868      between 1 and 2 mm excluded, and the second one contains the
3869      sphere with radius between 2 and 3 mm.
3870
3871           tabulate (sphere_radius, 10)
3872
3873      Tabulate returns ten bins.
3874
3875           tabulate (sphere_radius, [1, 1.5, 2, 2.5])
3876
3877      Tabulate returns three bins, the first contains the sphere with
3878      radius between 1 and 1.5 mm excluded, the second one contains the
3879      sphere with radius between 1.5 and 2 mm excluded, and the third
3880      contains the sphere with radius between 2 and 2.5 mm.
3881
3882           bar (table (:, 1), table (:, 2))
3883
3884      draw histogram.
3885
3886      See also: bar, pareto
3887
3888
3889
3890
3891
3892 # name: <cell-element>
3893 # type: sq_string
3894 # elements: 1
3895 # length: 26
3896 Compute a frequency table.
3897
3898
3899
3900 # name: <cell-element>
3901 # type: sq_string
3902 # elements: 1
3903 # length: 7
3904 tblread
3905
3906
3907 # name: <cell-element>
3908 # type: sq_string
3909 # elements: 1
3910 # length: 776
3911  -- Function File: [DATA, VARNAMES, CASENAMES] = tblread (FILENAME)
3912  -- Function File: [DATA, VARNAMES, CASENAMES] = tblread (FILENAME,
3913           DELIMETER)
3914      Read tabular data from an ascii file.
3915
3916      DATA is read from an ascii data file named FILENAME with an
3917      optional DELIMETER.  The delimeter may be any single character or
3918         * "space" " " (default)
3919
3920         * "tab" "\t"
3921
3922         * "comma" ","
3923
3924         * "semi" ";"
3925
3926         * "bar" "|"
3927
3928      The DATA is read starting at cell (2,2) where the VARNAMES form a
3929      char matrix from the first row (starting at (1,2)) vertically
3930      concatenated, and the CASENAMES form a char matrix read from the
3931      first column (starting at (2,1)) vertically concatenated.
3932
3933      See also: tblwrite, csv2cell, cell2csv
3934
3935
3936
3937
3938
3939 # name: <cell-element>
3940 # type: sq_string
3941 # elements: 1
3942 # length: 37
3943 Read tabular data from an ascii file.
3944
3945
3946
3947 # name: <cell-element>
3948 # type: sq_string
3949 # elements: 1
3950 # length: 8
3951 tblwrite
3952
3953
3954 # name: <cell-element>
3955 # type: sq_string
3956 # elements: 1
3957 # length: 765
3958  -- Function File:  tblwrite (DATA, VARNAMES, CASENAMES, FILENAME)
3959  -- Function File:  tblwrite (DATA, VARNAMES, CASENAMES, FILENAME,
3960           DELIMETER)
3961      Write tabular data to an ascii file.
3962
3963      DATA is written to an ascii data file named FILENAME with an
3964      optional DELIMETER.  The delimeter may be any single character or
3965         * "space" " " (default)
3966
3967         * "tab" "\t"
3968
3969         * "comma" ","
3970
3971         * "semi" ";"
3972
3973         * "bar" "|"
3974
3975      The DATA is written starting at cell (2,2) where the VARNAMES are
3976      a char matrix or cell vector written to the first row (starting at
3977      (1,2)), and the CASENAMES are a char matrix (or cell vector)
3978      written to the first column (starting at (2,1)).
3979
3980      See also: tblread, csv2cell, cell2csv
3981
3982
3983
3984
3985
3986 # name: <cell-element>
3987 # type: sq_string
3988 # elements: 1
3989 # length: 36
3990 Write tabular data to an ascii file.
3991
3992
3993
3994 # name: <cell-element>
3995 # type: sq_string
3996 # elements: 1
3997 # length: 8
3998 trimmean
3999
4000
4001 # name: <cell-element>
4002 # type: sq_string
4003 # elements: 1
4004 # length: 387
4005  -- Function File: A = trimmean (X, P)
4006      Compute the trimmed mean.
4007
4008      The trimmed mean of X is defined as the mean of X excluding the
4009      highest and lowest P percent of the data.
4010
4011      For example
4012
4013           mean ([-inf, 1:9, inf])
4014
4015      is NaN, while
4016
4017           trimmean ([-inf, 1:9, inf], 10)
4018
4019      excludes the infinite values, which make the result 5.
4020
4021      See also: mean
4022
4023
4024
4025
4026
4027 # name: <cell-element>
4028 # type: sq_string
4029 # elements: 1
4030 # length: 25
4031 Compute the trimmed mean.
4032
4033
4034
4035 # name: <cell-element>
4036 # type: sq_string
4037 # elements: 1
4038 # length: 5
4039 tstat
4040
4041
4042 # name: <cell-element>
4043 # type: sq_string
4044 # elements: 1
4045 # length: 798
4046  -- Function File: [M, V] = tstat (N)
4047      Compute mean and variance of the t (Student) distribution.
4048
4049 Arguments
4050 ---------
4051
4052         * N is the parameter of the t (Student) distribution. The
4053           elements of N must be positive
4054
4055 Return values
4056 -------------
4057
4058         * M is the mean of the t (Student) distribution
4059
4060         * V is the variance of the t (Student) distribution
4061
4062 Example
4063 -------
4064
4065           n = 3:8;
4066           [m, v] = tstat (n)
4067
4068 References
4069 ----------
4070
4071        1. Wendy L. Martinez and Angel R. Martinez. `Computational
4072           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
4073           Chapman & Hall/CRC, 2001.
4074
4075        2. Athanasios Papoulis. `Probability, Random Variables, and
4076           Stochastic Processes'. McGraw-Hill, New York, second edition,
4077           1984.
4078
4079
4080
4081
4082 # name: <cell-element>
4083 # type: sq_string
4084 # elements: 1
4085 # length: 58
4086 Compute mean and variance of the t (Student) distribution.
4087
4088
4089
4090 # name: <cell-element>
4091 # type: sq_string
4092 # elements: 1
4093 # length: 8
4094 unidstat
4095
4096
4097 # name: <cell-element>
4098 # type: sq_string
4099 # elements: 1
4100 # length: 840
4101  -- Function File: [M, V] = unidstat (N)
4102      Compute mean and variance of the discrete uniform distribution.
4103
4104 Arguments
4105 ---------
4106
4107         * N is the parameter of the discrete uniform distribution. The
4108           elements of N must be positive natural numbers
4109
4110 Return values
4111 -------------
4112
4113         * M is the mean of the discrete uniform distribution
4114
4115         * V is the variance of the discrete uniform distribution
4116
4117 Example
4118 -------
4119
4120           n = 1:6;
4121           [m, v] = unidstat (n)
4122
4123 References
4124 ----------
4125
4126        1. Wendy L. Martinez and Angel R. Martinez. `Computational
4127           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
4128           Chapman & Hall/CRC, 2001.
4129
4130        2. Athanasios Papoulis. `Probability, Random Variables, and
4131           Stochastic Processes'. McGraw-Hill, New York, second edition,
4132           1984.
4133
4134
4135
4136
4137 # name: <cell-element>
4138 # type: sq_string
4139 # elements: 1
4140 # length: 63
4141 Compute mean and variance of the discrete uniform distribution.
4142
4143
4144
4145 # name: <cell-element>
4146 # type: sq_string
4147 # elements: 1
4148 # length: 8
4149 unifstat
4150
4151
4152 # name: <cell-element>
4153 # type: sq_string
4154 # elements: 1
4155 # length: 1047
4156  -- Function File: [M, V] = unifstat (A, B)
4157      Compute mean and variance of the continuous uniform distribution.
4158
4159 Arguments
4160 ---------
4161
4162         * A is the first parameter of the continuous uniform
4163           distribution
4164
4165         * B is the second parameter of the continuous uniform
4166           distribution
4167      A and B must be of common size or one of them must be scalar and A
4168 must be less than B
4169
4170 Return values
4171 -------------
4172
4173         * M is the mean of the continuous uniform distribution
4174
4175         * V is the variance of the continuous uniform distribution
4176
4177 Examples
4178 --------
4179
4180           a = 1:6;
4181           b = 2:2:12;
4182           [m, v] = unifstat (a, b)
4183
4184           [m, v] = unifstat (a, 10)
4185
4186 References
4187 ----------
4188
4189        1. Wendy L. Martinez and Angel R. Martinez. `Computational
4190           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
4191           Chapman & Hall/CRC, 2001.
4192
4193        2. Athanasios Papoulis. `Probability, Random Variables, and
4194           Stochastic Processes'. McGraw-Hill, New York, second edition,
4195           1984.
4196
4197
4198
4199
4200 # name: <cell-element>
4201 # type: sq_string
4202 # elements: 1
4203 # length: 65
4204 Compute mean and variance of the continuous uniform distribution.
4205
4206
4207
4208 # name: <cell-element>
4209 # type: sq_string
4210 # elements: 1
4211 # length: 5
4212 vmpdf
4213
4214
4215 # name: <cell-element>
4216 # type: sq_string
4217 # elements: 1
4218 # length: 319
4219  -- Function File: THETA = vmpdf (X, MU, K)
4220      Evaluates the Von Mises probability density function.
4221
4222      The Von Mises distribution has probability density function
4223           f (X) = exp (K * cos (X - MU)) / Z ,
4224      where Z is a normalisation constant. By default, MU is 0 and K is
4225      1.
4226
4227      See also: vmrnd
4228
4229
4230
4231
4232
4233 # name: <cell-element>
4234 # type: sq_string
4235 # elements: 1
4236 # length: 53
4237 Evaluates the Von Mises probability density function.
4238
4239
4240
4241 # name: <cell-element>
4242 # type: sq_string
4243 # elements: 1
4244 # length: 5
4245 vmrnd
4246
4247
4248 # name: <cell-element>
4249 # type: sq_string
4250 # elements: 1
4251 # length: 518
4252  -- Function File: THETA = vmrnd (MU, K)
4253  -- Function File: THETA = vmrnd (MU, K, SZ)
4254      Draw random angles from a Von Mises distribution with mean MU and
4255      concentration K.
4256
4257      The Von Mises distribution has probability density function
4258           f (X) = exp (K * cos (X - MU)) / Z ,
4259      where Z is a normalisation constant.
4260
4261      The output, THETA, is a matrix of size SZ containing random angles
4262      drawn from the given Von Mises distribution. By default, MU is 0
4263      and K is 1.
4264
4265      See also: vmpdf
4266
4267
4268
4269
4270
4271 # name: <cell-element>
4272 # type: sq_string
4273 # elements: 1
4274 # length: 80
4275 Draw random angles from a Von Mises distribution with mean MU and
4276 concentration 
4277
4278
4279
4280 # name: <cell-element>
4281 # type: sq_string
4282 # elements: 1
4283 # length: 7
4284 wblstat
4285
4286
4287 # name: <cell-element>
4288 # type: sq_string
4289 # elements: 1
4290 # length: 1050
4291  -- Function File: [M, V] = wblstat (SCALE, SHAPE)
4292      Compute mean and variance of the Weibull distribution.
4293
4294 Arguments
4295 ---------
4296
4297         * SCALE is the scale parameter of the Weibull distribution.
4298           SCALE must be positive
4299
4300         * SHAPE is the shape parameter of the Weibull distribution.
4301           SHAPE must be positive
4302      SCALE and SHAPE must be of common size or one of them must be
4303 scalar
4304
4305 Return values
4306 -------------
4307
4308         * M is the mean of the Weibull distribution
4309
4310         * V is the variance of the Weibull distribution
4311
4312 Examples
4313 --------
4314
4315           scale = 3:8;
4316           shape = 1:6;
4317           [m, v] = wblstat (scale, shape)
4318
4319           [m, v] = wblstat (6, shape)
4320
4321 References
4322 ----------
4323
4324        1. Wendy L. Martinez and Angel R. Martinez. `Computational
4325           Statistics Handbook with MATLAB'. Appendix E, pages 547-557,
4326           Chapman & Hall/CRC, 2001.
4327
4328        2. Athanasios Papoulis. `Probability, Random Variables, and
4329           Stochastic Processes'. McGraw-Hill, New York, second edition,
4330           1984.
4331
4332
4333
4334
4335 # name: <cell-element>
4336 # type: sq_string
4337 # elements: 1
4338 # length: 54
4339 Compute mean and variance of the Weibull distribution.
4340
4341
4342
4343
4344