Post Reply 
HP Prime for advance statistics
03-24-2015, 07:48 PM
Post: #6
RE: HP Prime for advance statistics
(09-04-2014 03:28 PM)Namir Wrote:  BestMLR2

Code:
EXPORT BestMLR2(Data,lstSel,lstX,lstZ,lstY)
BEGIN
  ...
  LOCAL Sum1,Sum2,Rsqr,YMean,Yhat;
  ...
        // calculate ymean
        Sum1:=0;
        FOR i FROM 1 TO NumRows DO
          Sum1:=Sum1+VectY(i,1);
        END;
        Ymean:=Sum1/NumRows;
        // calculate the coefficient of determination
        Sum1:=0;
        Sum2:=0;
        Yhat:=MatX*RegCoeff;
        FOR i FROM 1 TO NumRows DO
          Sum1:=Sum1+(Yhat(i,1)-Ymean)^2;
          Sum2:=Sum2+(VectY(i,1)-Ymean)^2;
...
END;


hi Namir,
in BestMLR2 there is a little typo: YMean and Ymean; to correct it I simply change the namevar in Local definition...
However is a very useful program!
All the suite of these programs should be inside the FW of Prime, perhaps with other programs to analyze multiple regression, thank you to have done them!

Salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP Prime for advance statistics - pr011235 - 09-04-2014, 07:02 AM
RE: HP Prime for advance statistics - salvomic - 03-24-2015 07:48 PM



User(s) browsing this thread: 1 Guest(s)