Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void BinomFit(TVec *X, double N, TVec *p); | Calculate parameters for binomial distributed values. |
| 2 | void BinomFit(TVec *X, TVec *N, TVec *p); | |
| 3 | void BinomFit(TVec *X, double N, TVec *p, TVec *Low, TVec *High, double Alpha = 0.05); | Calculate parameters for binomial distributed values. |
| 4 | void BinomFit(TVec *X, int &N, double &p); |
Overload 1: void BinomFit(TVec *X, double N, TVec *p);
Calculate parameters for binomial distributed values.
Examples
#include "MtxExpr.h"
#include "MtxExprInt.h"
#include "Units.StatRandom.h"
#include "Units.Statistics.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Stats;
using namespace Dew::Stats::Units::StatRandom;
using namespace Dew::Stats::Units::Statistics;
void Example()
{
Vector vec1;
Vector LowInt, HighInt, p;
VectorInt ivec1;
ivec1.Size(1000);
RandomBinom(35, 0.25, ivec1);
vec1.Copy(ivec1);
// Now extract p-s and its 100*(1-Alpha)
// confidence intervals.
BinomFit(vec1, 35, p, LowInt, HighInt);
// vector p holds the p for each element in vec1,
// vectors LowInt and HighInt hold the lower and upper conf. int. limit
// for each element in p
}
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler
Overload 2: void BinomFit(TVec *X, TVec *N, TVec *p);
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler
Overload 3: void BinomFit(TVec *X, double N, TVec *p, TVec *Low, TVec *High, double Alpha = 0.05);
Calculate parameters for binomial distributed values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | Stores data which is assumed to be binomial distributed. |
| 2 | N | double | Defines binomial distribution n parameter. |
| 3 | p | TVec * | Returns binomial distribution p parameter, estimated at each X value. |
| 4 | Low | TVec * | |
| 5 | High | TVec * | p (1-Alpha)*100 percent confidence intervals. Each pair of Low and High values defines lower and upper CI for corresponding p value. |
| 6 | Alpha = 0.05 | double | Confidence interval percentage. |
Examples
#include "MtxExpr.h"
#include "MtxExprInt.h"
#include "Units.StatRandom.h"
#include "Units.Statistics.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Stats;
using namespace Dew::Stats::Units::StatRandom;
using namespace Dew::Stats::Units::Statistics;
void Example()
{
Vector vec1(1000, false);
Vector LowInt(0);
Vector HighInt(0);
Vector p(0);
VectorInt ivec1(1000);
RandomBinom(35, 0.25, ivec1, -1);
vec1.Copy(ivec1);
// Now extract p-s and its 100*(1-Alpha)
// confidence intervals.
BinomFit(vec1, 35, p, LowInt, HighInt, 0.05);
// vector p holds the p for each element in vec1,
// vectors LowInt and HighInt hold the lower and upper conf. int. limit
// for each element in p
}
See Also: RandomBinom, BinomStat
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler
Overload 4: void BinomFit(TVec *X, int &N, double &p);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | N | int & | |
| 3 | p | double & |
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler