#include <rw/analytics/logregress.h>
#include <iostream>
int main() {
[1 234 2 431 3 333 4 654 5 788] ";
obsData[0] = obsData[3] = obsData[4] = true;
obsData[1] = obsData[2] = false;
return 0;
}
double sigLevel = .05;
for (
size_t i = 0; i < params.
length(); i++) {
std::cout << "Model parameter " << i
<< (i == 0 ? " Intercept:" : ":") << std::endl;
std::cout << " value: " << params[i].value()
<< std::endl;
std::cout << " standard error: "
<< params[i].standardError() << std::endl;
std::cout << " Wald statistic: "
<< params[i].waldChiSqStatistic() << std::endl;
std::cout << " Wald statistic P-value: "
<< params[i].waldChiSqStatPValue() << std::endl;
std::cout << " Wald statistic critical value: "
<< params[i].waldChiSqStatCriticalValue(sigLevel)
<< std::endl;
std::cout << " " << sigLevel << " confidence interval: "
<< "["
<< params[i].confidenceInterval(sigLevel).lowerBound()
<< ", "
<< params[i].confidenceInterval(sigLevel).upperBound()
<< "]" << std::endl;
}
return 0;
}
A templatized general matrix class.
Definition genmat.h:741
A templatized vector class.
Definition mathvec.h:667
bool fail() const
Definition regress.h:302
size_type length() const
Definition tvvector.h:490