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     [CLOSED] calculate the mode arithmetic

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] calculate the mode arithmetic
 Login/Join
 
Gold member
posted
Good afternon.
Someone can help , i need calculate the mode arithmetic
of a serie of number,for example :
I have diferents number 16 ,18 ,19 ,20 , 20 ,21 the mode aritmetic is 20 , there is some way for make this.

Thanks for everything.

This message has been edited. Last edited by: Kerry,
 
Posts: 62 | Registered: September 18, 2008Report This Post
Virtuoso
posted Hide Post
Do you know how to calculate this in excel? Or in any other program without using an per designed formula?
In other words do you know the mathematic formula.
If you do, you can create this.
You can create an external formula and use that.




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 haven't looked, but would this be in RSTAT ?

I think you need a licence for it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Modulo calculation is not statistic as far as i know




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
Maybe MEDIAN?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
I think we need clarification.

Mode According to wikipedia


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
To calculate mode, the entire population has to be examined in order find the prevalent value(s).
Here is an example using the CAR file and two TABLE commands:
DEFINE FILE CAR
INSTANCE/I9 = 1;
END
TABLE FILE CAR
SUM INSTANCE BY SEATS
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT SEATS INSTANCE
BY HIGHEST INSTANCE NOPRINT
END
The first pass will identify the mode and the second will print the instances out in high to low order. Be wary of multi-modal distributions.
In this example, SEATS = 5 is the mode.
HTH (from Maui)

This message has been edited. Last edited by: jimster06,


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Virtuoso
posted Hide Post
There seems to be some confusion about what is ment.
Mode: the frequency of the amount in a certain series.
Mod arithmetic : http://en.wikipedia.org/wiki/Modular_arithmetic

So...what wil it be?




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
Guru
posted Hide Post
Ah......Requirements Definition - the real challenge of our profession!


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Master
posted Hide Post
If you are looking for most frequent occurance, then here is the sample code.
TABLE FILE CAR
SUM
COMPUTE CNT_SEATS/I2=CNT.SEATS; 
BY SEATS
ON TABLE HOLD
END
TABLE FILE HOLD
BY HIGHEST 1 CNT_SEATS
ON TABLE HOLD AS HOLD_2 FORMAT ALPHA
END
-RUN
-READ HOLD_2 &MAX_CNT.I2.
-? &MAX_CNT

TABLE FILE HOLD
PRINT
SEATS
CNT_SEATS AS 'No of Occurance'
WHERE CNT_SEATS EQ &MAX_CNT;
END

Note: Final result will give you mode values. Works for both Uni-Model and Multi-Model.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Gold member
posted Hide Post
I don understand this solutions,
I try make this:
TABLE FILE INFORME

COUNT ENTRIES AS 'FRECUENCIA'
BY AGE
PRINT *

-*ON TABLE HOLD AS INFORME2 FORMAT FOCUS
END
-RUN
thi give 2 cols , after i want get age whit more frecuency .
Thanks for all, but somebody can help me.
 
Posts: 62 | Registered: September 18, 2008Report This Post
Virtuoso
posted Hide Post
So you get two columns, one with the age and one with the number of ppl of that age, ?
Is this nit what you want?




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
Gold member
posted Hide Post
I want other columns the mode in this column had a value ,this value age whit more frecuency
 
Posts: 62 | Registered: September 18, 2008Report This Post
Virtuoso
posted Hide Post
Sorry...I have now idea what you mean and what you want.
Can't you post an example based on one of the sample databases so we might better understand the problem




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
Member
posted Hide Post
Ram has the right solution. I think we need to look at what his data set would look like:
2,2,2,2,2,4,4,4,4,4,5,5,5,5,5,5,5,5
Five twos, five fours and eight fives. The most prevalent value is 5 - which is the mode. You can have multiple modes if there is a tie.


Developer Studio 7.7.05
Application Studio 8.0.09
Windows 7
All Formats
 
Posts: 16 | Location: Seattle, WA | Registered: November 29, 2012Report This Post
Gold member
posted Hide Post
I try get mode serie of numbers
example i have ages 19.20 ,21,23,21, the mode is 21.
i have by titulation example
TABLE FILE EXPEDIENTS
SUM
COUNT ENTRIES BY AGE
END
whit this i have 2 columns frecuency and age ,but i dont know how get the mode, also need group by titulation:
AGE FRECUENCY MODE
19 1
18 3
18
18
17 1
I need mode.
This proble this solutioned whit sql whit sql ora.
I want give one thousand thanks, this focal is gratefull i hel me all days in my job.
Thanks.
 
Posts: 62 | Registered: September 18, 2008Report This Post
Virtuoso
posted Hide Post
Last try....

-SET &ECHO=ALL;
SET HOLDLIST=PRINTONLY
SET ASNAMES=ON

TABLE FILE EXPEDIENTS
SUM COUNT ENTRIES AS NUMBER
BY AGE
ON TABLE HOLD
END
TABLE FILE HOLD
BY HIGHEST 1 NUMBER
ON TABLE HOLD AS XXX FORMAT ALPHA
END
-READ XXX &MOD.I5
DEFINE FILE EXPEDIENTS
MODX/A1=IF AGE EQ &MOD THEN '*' ELSE '';
END
TABLE FILE EXPEDIENTS
PRINT EMPLOYEE
AGE
MODX
FOOTING
"These are all employees, the mod is &MOD"
END




I have no idea if EMPLOYEE is a field in your database, but this could also be CLIENTNAME.
If you copy this code exact as posted, I want you to tell us what you get and if this is what you need.
If there is an error you should see that too.

I hope this works..




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
Virtuoso
posted Hide Post
According to Wiki: "The mode is the value that appears most often in a set of data"

So using the CAR file and the field MPG:
  
TABLE FILE CAR
SUM CNT.MPG AS MPGCNT
BY MPG
ON TABLE SET ASNAMES ON
ON TABLE HOLD
END
TABLE FILE HOLD
SUM MAX.MPG AS MPG_MODE
BY HIGHEST 1 MPGCNT NOPRINT
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Gold member
posted Hide Post
Hello Danny.
I like you solution , i wold need some more ,i need this field mode and all field of table ,is possible i don t explain very good .
After i have work whit others field understand?

Thank for all.
 
Posts: 62 | Registered: September 18, 2008Report This Post
Virtuoso
posted Hide Post
Did you try my solution?
Copy and run!




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
Gold member
posted Hide Post
Hello FrankDutch,

Forgive , i could not answer all person ,i have little time a lot of work, you solution is good , you get a column mode for all hold , i want diferents mode for diferents titulations ,my problem is dificult explain in english,a lot of thanks i get this whit sql ,
i like you idea is good.

DEFINE FILE EXPEDIENTS
MODX/A1=IF AGE EQ &MOD THEN '*' ELSE '';
END

Good day.
 
Posts: 62 | Registered: September 18, 2008Report 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     [CLOSED] calculate the mode arithmetic

Copyright © 1996-2020 Information Builders