Choose Language Hide Translation Bar
Community Trekker

Standardize reaction time data by participant

Dear community,


how do I standardize a variable (in this case reaction time data) by another variable (participant)? I tried by looking at the distribution of the first variable by the second variable but did not find such a function and the normal standardize function does not give the option to do it by another variable. Every help would be very much appreiciated!


Thanks in advance and kind regards,



0 Kudos
Super User

Re: Standardize reaction time data by participant

All you need to do to solve this issue, is to use the formula for standardizing the data.  The formula for the standardization contains column functions that have the "By" calculation.  So here is an example script that does what you want.  It is standardizing to a mean of 100 and and std of 10


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

dt << New Column( "standard by sex",
		new mean = 100;
		new STD = 10;
		((:height - Col Mean( :height, :sex )) / Col Std Dev( :height, :sex )) * new STD
		+new mean;