Hi,
Im trying to create a new column where I calculate AUC. This value should only be calculated as long as animal no is identical.
So far I managed to create a new column and calculate the values:
(Data Table( "jmp forum row ite" ) << New Column( "AUC per animal",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
0.5 * (:Name( "VO2(1)-[ml/h/kg]" ) + Lag( :Name( "VO2(1)-[ml/h/kg]" ), -1 )) * (
:Name( "Time since dosing-[hours]" ) - Lag( :Name( "Time since dosing-[hours]" ), 1 ))
)
));
But when I try to include a row iteration checking for animal no. being identical jmp tells me that this shouldn´t be combined.
For Each Row( If( :Animal No. == Lag( :Animal No., -1 ), Formula(), "no value" ) );
Should this be done in several steps or is there a better way of doing that?