The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Programming Question for Stats
05-19-2015, 02:38 AM
Post: #1
Programming Question for Stats
Goal: Develop a program that determines the best fit between various regression types (the first six: Linear, Logarithmic, Exponential, Power, Exponent, Inverse).

However, I am getting the same correlation for each of the types. Here is the code (FW 7820):

Code:
EXPORT BESTFIT(xlist,ylist)
BEGIN
// 2015-05-15 EWS
// 2015-05-18 
LOCAL clist,k,m,p,c;

STARTAPP("Statistcs2Var");
C1:=xlist;
C2:=ylist;

S1(1):='C1';
S1(2):='C2';
 
CHECK(1);
clist:={};

// testing
FOR k FROM 1 TO 6 DO
S1(4):=k;
Do2VStats(S1);
c:=CoefDet;
// during execution c
// is the same despite
// type being changed
clist:=CONCAT(clist,{c});
END;

//find and display results
m:=MAX(clist);
p:=POS(clist,m);
S1(4):=p;
Do2VStats(S1);
// My intended results
//RETURN "Type: "+STRING(p)
//+", Coef: "+STRING(Corr,2,4);

RETURN clist;

END;

Advice?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Programming Question for Stats - Eddie W. Shore - 05-19-2015 02:38 AM



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