Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -6,8 +6,8 @@ proc statistic {AB A} {
|
|||
set sumAB [tcl::mathop::+ {*}$AB]
|
||||
set sumA [tcl::mathop::+ {*}$A]
|
||||
expr {
|
||||
$sumA / double([llength $A]) -
|
||||
($sumAB - $sumA) / double([llength $AB] - [llength $A])
|
||||
$sumA / double([llength $A]) -
|
||||
($sumAB - $sumA) / double([llength $AB] - [llength $A])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -18,13 +18,13 @@ proc selectCombinationsFrom {k l} {
|
|||
set n [expr {[llength $l] - [incr k -1]}]
|
||||
for {set i 0} {$i < $n} {} {
|
||||
set first [lindex $l $i]
|
||||
incr i
|
||||
incr i
|
||||
if {$k == 0} {
|
||||
lappend all $first
|
||||
} else {
|
||||
foreach s [selectCombinationsFrom $k [lrange $l $i end]] {
|
||||
lappend all [list $first {*}$s]
|
||||
}
|
||||
} else {
|
||||
foreach s [selectCombinationsFrom $k [lrange $l $i end]] {
|
||||
lappend all [list $first {*}$s]
|
||||
}
|
||||
}
|
||||
}
|
||||
return $all
|
||||
|
|
@ -38,9 +38,9 @@ proc permutationTest {A B} {
|
|||
set overcount 0
|
||||
set count 0
|
||||
foreach perm [selectCombinationsFrom [llength $A] $whole] {
|
||||
set t [statistic $whole $perm]
|
||||
incr count
|
||||
if {$t <= $Tobs} {incr undercount} else {incr overcount}
|
||||
set t [statistic $whole $perm]
|
||||
incr count
|
||||
if {$t <= $Tobs} {incr undercount} else {incr overcount}
|
||||
}
|
||||
set count [tcl::mathfunc::double $count]
|
||||
list [expr {$overcount / $count}] [expr {$undercount / $count}]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue