cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Col Mean without excluded rows

tom_abramov
Level V

Hi.

Is there a way to add a Col Mean formula so the excluded rows will be excluded from the calculation?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User


Re: Col Mean without excluded rows

Since JMP16? you can add Excluded(Row State()) to Col statistical functions

jthi_1-1736167939273.png

Do note that it will still calculate Mean for excluded rows as a separate "excluded" group.

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Clear Row States << Select Rows(Index(1, 10)) << Exclude;
dt << New Column("Col Mean for each Sex", Formula(Col Mean(:height, :sex)));
dt << New Column("Col Mean for each Sex grouped by Excluded",
	Formula(Col Mean(:height, :sex, Excluded(Row State())))
);

jthi_2-1736168001487.png

 

-Jarmo

View solution in original post

2 REPLIES 2
Victor_G
Super User


Re: Col Mean without excluded rows

Hi @tom_abramov,

 

Happy new Year 2025 !

See previous response from @txnelson and @jthi on this exact same question :Why is my column mean not matching with one calculated via the distribution platform, after excludin... 

 

Hope these solutions will also solve your problem,

Victor GUILLER

"It is not unusual for a well-designed experiment to analyze itself" (Box, Hunter and Hunter)
jthi
Super User


Re: Col Mean without excluded rows

Since JMP16? you can add Excluded(Row State()) to Col statistical functions

jthi_1-1736167939273.png

Do note that it will still calculate Mean for excluded rows as a separate "excluded" group.

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Clear Row States << Select Rows(Index(1, 10)) << Exclude;
dt << New Column("Col Mean for each Sex", Formula(Col Mean(:height, :sex)));
dt << New Column("Col Mean for each Sex grouped by Excluded",
	Formula(Col Mean(:height, :sex, Excluded(Row State())))
);

jthi_2-1736168001487.png

 

-Jarmo