示例#1
0
def ModeratedWelchTest(gs,d0,s0_squared):
    df = gs.DF()

    ### use the s0_squared for the pairwise comparison calculated in the getModeratedStandardDeviation
    svar1 = (d0*s0_squared+df*gs.Svar1())/(d0+df)
    svar2 = (d0*s0_squared+df*gs.Svar2())/(d0+df)
    #svar = sg ### Use this to test and see if this gives the same result as a non-moderated t-test
    if svar1 != 0 and svar2 != 0:
        t = (gs.Avg1()-gs.Avg2())/math.sqrt(svar1+svar2)
        prob = salstat_stats.betai(0.5*df,0.5,float(df)/(df+t*t))
    else: prob = 1
    #gs.SetAdjP(prob)
    gs.setPval(prob)
示例#2
0
def ModeratedWelchTest(gs,d0,s0_squared):
    df = gs.DF()

    ### use the s0_squared for the pairwise comparison calculated in the getModeratedStandardDeviation
    svar1 = (d0*s0_squared+df*gs.Svar1())/(d0+df)
    svar2 = (d0*s0_squared+df*gs.Svar2())/(d0+df)
    #svar = sg ### Use this to test and see if this gives the same result as a non-moderated t-test
    if svar1 != 0 and svar2 != 0:
        t = (gs.Avg1()-gs.Avg2())/math.sqrt(svar1+svar2)
        prob = salstat_stats.betai(0.5*df,0.5,float(df)/(df+t*t))
    else: prob = 1
    #gs.SetAdjP(prob)
    gs.setPval(prob)
示例#3
0
def incompleteBeta(t,df):
    p = salstat_stats.betai(0.5*df,0.5,df/(df+t*t))
    return p
示例#4
0
def incompleteBeta(t,df):
    p = salstat_stats.betai(0.5*df,0.5,df/(df+t*t))
    return p