Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regression Analysis in Foxpro
Message
De
02/05/2005 23:32:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
02/05/2005 07:38:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01010100
Message ID:
01010379
Vues:
26
>I'm looking for a subroutine that will perform a regression analysis on data in a Foxpro table. Anyone have any suggestions of where to look? Thanks...

The "best fit" is defined as the line where the squares of the distances of the individual data points, from the resulting line, is at a minimum.

Excel help, for the corresponding functions, explains how Excel does the calculation.

Basically, it seems that for a single independent variable, x, the slope m would be:
    sum((x - xx)(y - yy))
m = --------------------------
       sum((x-xx)^2)
and the intersect, b:
b = yy - m*xx
Where I used xx and yy for the average values of x and y. If I understand correctly, the two sums must be done separately, adding the formula result for all the data points.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform