in reply to strange collision when calculating p-values using Statistics::TTest
Usually a module's author will typically stick to using an array or hash for storage in the module. MJD's scrubber gets them all, but you may only need something like this at the end of your loop, to undef your temp arrays.
foreach my $dataset (sort keys %datasets) { my $ttest = new Statistics::TTest; $ttest->load_data(\@{$datasets{$dataset}[0]},\@{$datasets{$dataset +}[1]}); print "$dataset - t_prob:\t$ttest->{t_prob}\n\n"; undef @$ttest; # clear out old array data undef %$ttest; # get old hash data }
|
|---|