cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
tom_abramov
Level V

Col Mean without excluded rows

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