cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
FN
FN
Level VI

Summary table ignoring weight column in specific conditions (bug?)

For some reason, when adding to summary a Median(), it ignores the weights provided for other statistics.

 

Here, I am creating a simple filter where every male row has 0 weight, hence max and min for males should not exist.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


// New column: Filter
dt << New Column( "Filter",
	Numeric,
	"Continuous",
	Format( "Best", 12 ),
	Formula( :sex != "M" )
);

list_columns_to_group = {"height", "weight"};


// Ignores weights for max, min... dt << Summary( Group( :Sex ), Mean(list_columns_to_group), Max( list_columns_to_group ), Min(list_columns_to_group ), Median(list_columns_to_group), Weight(:Filter));

// Works as expected dt << Summary( Group( :Sex ), Mean(list_columns_to_group), Max( list_columns_to_group ), Min(list_columns_to_group ), //Median(list_columns_to_group), Weight(:Filter));

FN_0-1633414466115.png

 

2 REPLIES 2

Re: Summary table ignoring weight column in specific conditions (bug?)

I'm just guessing, but does it make sense to apply a weight to a quantile or the cumulative distribution function?

 

It makes sense with moments, but maybe not with the CDF.

FN
FN
Level VI

Re: Summary table ignoring weight column in specific conditions (bug?)

I have updated the description as the main issue I found is that it ignores the weights for other statistics.

 

About weight median, this is a topic by itself :)

https://en.wikipedia.org/wiki/Weighted_median

Recommended Articles