This looks good. Thanks. On Tue, Nov 29, 2011 at 10:01 PM, Gérard Lochon <[email protected]> wrote:
> > > > > Anyone know of a VFP friendly Least Square Regression Routine? Free is > > good. > > > > > If you want the coefficients of a regression line : > > CREATE CURSOR test (xi n(4),yi n(4)) > INSERT INTO test VALUES (1,180) > INSERT INTO test VALUES (2,182) > INSERT INTO test VALUES (3,187) > INSERT INTO test VALUES (4,188) > > *** > > SELECT ; > AVG(xi),; > AVG(yi),; > SUM( (xi-(select AVG(xi) FROM test as hihi))* (yi-(select AVG(yi) FROM > test as haha))),; > SUM((xi-(select AVG(xi) FROM test as hihi))**2) ; > FROM test ; > INTO ARRAY atest > > ca = atest(3)/atest(4) > cb = atest(2) - ca*atest(1) > > *** > > ?"Y = ca.X + cb" > ?"ca = ",ca > ?"cb = ",cb > > > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAPpp0hU9H6GBwvZcJ=fqu+c+7px9b3znj9aw5w4tkdkae08...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

