Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Multi Linear Regression

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Multi Linear Regression
 Login/Join
 
Gold member
posted
Anyone ever done a Multi Linear Regression to calculate the Slope and the Intercept. I know they have the REGRESS function, but that unfortunately doesn't give the formula.

I've got a scenario where I'm looking for the slope and intercept for a function with 2 "x" variables.

Guess I was checking to see if anyone has already encountered this and if there was a way to get the slope and intercept from the "REGRESS" function.


Prod: WebFOCUS 7.6.4 - Self Service - Windows Server2003 - Apache Tomcat 5.5
Dev: WebFOCUS 7.6.4 - Self Service - Windows XP SP2 - Apache Tomcat 5.5
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Report This Post
Member
posted Hide Post
That and more was there with the ANALYZE function back in PC/Focus 6.01.. disappeared since..
 
Posts: 5 | Registered: April 25, 2006Report This Post
Virtuoso
posted Hide Post
yes that was a great functionality....

the old days




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
i guess that's why there is a relationship with the stat software company SPSS. I, like amsterdam frank, miss the old analyze days.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
http://documentation.informationbuilders.com/masterinde...df_archive/stats.pdf

The above links to a manual that pertains to the analyse command has formulas displayed for various kinds of regresssion. You need to login to tech support. I have these formulas in an old mainframe manual but there is no way for me type it here because of the various Greek symbols and sub/super scripts. I tried to cut and paste them from the above pdf report above but that did not work either. There were at least 3 fuctions (possibly more) that mention regression specifically. MULTR - for multiple linear regression, POLRG - polynomial regression, STEPR - stepwise multiple regression analysis. I think this still works on the mainframe but this stuff is way over my head as to what it means.

Good luck.

et


FOCUS 7.6 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
Master
posted Hide Post
Hi Leo,

In the first step, I compute the slope and intercept, for all observations.:

  
-TYPE  Calculating Slope and Intercept for Linear Equation to follow..
JOIN CLEAR *
DEFINE FILE ALLCHGIN
 X/D15.4      = VOL_MNTH;
 Y/D15.4      = VOLUME;
 XY/D15.4     = X * Y;
 XCUBED/D15.4 = X * X;
END
TABLE FILE ALLCHGIN
"Slope and Y Intercept Components"
" "
SUM X Y XY XCUBED CNT.X AVE.X AVE.Y
COMPUTE SLOPE/D15.4 = (XY - ((X * Y) / CNT.X)) /
                      (XCUBED - ((X * X) / CNT.X));
COMPUTE YINTERCEPT/D15.4 = IF CNT.X EQ 1 THEN 0 ELSE
                            AVE.Y - (SLOPE * AVE.X);
BY UNIT_ID
ON TABLE HOLD AS REGCALCS FORMAT FOCUS INDEX UNIT_ID
END


In the second step, I join my observation file, to my results file, and create my predicted values:

  
-TYPE  Creating Predicted Values for the first sixty 'historical months'..
JOIN CLEAR *
JOIN UNIT_ID IN ALLCHGIN TO UNIT_ID IN REGCALCS AS GETCALS
DEFINE FILE ALLCHGIN
 PREDICTED/D15.4 = YINTERCEPT +(SLOPE * VOL_MNTH);
END
TABLE FILE ALLCHGIN
PRINT VOL_MNTH
      YINTERCEPT
      SLOPE
      VOLUME
      PREDICTED
BY    UNIT_ID
ON TABLE HOLD AS HISTMOS FORMAT FOCUS
END


Perhaps this code is adaptable to your requirements.

Regards,
Dave




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Gold member
posted Hide Post
Well I've come up with a solution that works for my application, so I thought I would share the code for other people that might be in the same scenario.

[CODE]
-*...
-* In the table with the data, we added
-* COMPUTE ONE/I1 = 1;
-* In order to join in the formula afterwards

DEFINE FILE DATA
X1SQ/D18.1 = X1 * X1;
X2SQ/D18.1 = X2 * X2;
X1X2/D18.1 = X1 * X2;
X1Y/D18.1 = X1 * Y;
X2Y/D18.1 = X2 * Y;
END

TABLE FILE DATA
SUM Y X1 X2
X1SQ X2SQ X1X2 X1Y X2Y
ON TABLE HOLD AS REGRESS1 FORMAT ALPHA
END

DEFINE FILE REGRESS1
D2/D20 = X1SQ * X2SQ - X1X2*X1X2;
F7/D20.10 = X2SQ / D2;
F8/D20.10 = -X1X2 / D2;
F9/D20.10 = X1SQ / D2;
INTERCEPT/D18.4 = F7 * X1Y + F8 * X2Y;
SLOPE/D18.4 = F8 * X1Y + F9 * X2Y;
ONE/I1 = 1;
END

TABLE FILE REGRESS1
SUM SLOPE INTERCEPT
BY ONE
ON TABLE HOLD AS REGRESS FORMAT FOCUS INDEX ONE
END

JOIN ONE IN DATA TO ONE IN REGRESS
...
[/CODE}

So assuming I renamed all the names correcty to the more generic example table, this was my solution for the multilinear equation in order to get the "formula" values.


Prod: WebFOCUS 7.6.4 - Self Service - Windows Server2003 - Apache Tomcat 5.5
Dev: WebFOCUS 7.6.4 - Self Service - Windows XP SP2 - Apache Tomcat 5.5
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Multi Linear Regression

Copyright © 1996-2020 Information Builders