[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] F-Statistic for linear regression
From: |
botto |
Subject: |
[Help-gsl] F-Statistic for linear regression |
Date: |
Wed, 25 Jul 2007 13:17:01 GMT |
Dear list members,
Can I calculate the f-statistic for a linear regression estimated with
gsl_fit_linear() with some of the GSL functions? My current little test
procedure ist appended below. What I am still missing or do really look
for is the p-value of the f-statistic.
best regards,
Benjamin Otto
#include <stdio.h>
#include <gsl/gsl_fit.h>
#include <gsl/gsl_randist.h>
int
main (void)
{
int n = 9;
double x[9] = { 1,2,3,4,5,6,7,8,9 };
double y[9] = { 2,3,5,4,6,7,9,0,10 };
double c0, c1, cov00, cov01, cov11, sumsq;
gsl_fit_linear (x, 1, y, 1, n,
&c0, &c1, &cov00, &cov01, &cov11,
&sumsq);
printf ("# best fit: Y = %g + %g X\n", c0, c1);
printf ("# covariance matrix:\n");
printf ("# [ %g, %g\n# %g, %g]\n",
cov00, cov01, cov01, cov11);
printf ("# sumsq = %g\n", sumsq);
return 0;
}
--
Pflichtangaben gemäß Gesetz über elektronische Handelsregister und
Genossenschaftsregister sowie das Unternehmensregister (EHUG):
Universitätsklinikum Hamburg-Eppendorf
Körperschaft des öffentlichen Rechts
Gerichtsstand: Hamburg
Vorstandsmitglieder:
Prof. Dr. Jörg F. Debatin (Vorsitzender)
Dr. Alexander Kirstein
Ricarda Klein
Prof. Dr. Dr. Uwe Koch-Gromus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] F-Statistic for linear regression,
botto <=