在列分位数计算中排除行你好,
我试图获取 Col Quantile( :height, 0.5, :class) 但看起来计算仍会考虑排除的行。
有没有办法拒绝排除的行进入 Col Quantile 计算?
谢谢,
绿
脚本回复:排除 Col 分位数计算中的行您可以在 Col Quantile() 函数中检查被排除的行。下面是一个例子
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Col Quantile Height by Age",
numeric,
continuous,
formula( Col Quantile(If(excluded(rowstate(Row())),., :height), 0.5, :age ) )
);
每当数据表中的行的排除行状态发生变化时,公式将计算新值