Convert t to SMD

# Standardized mean diff SMD (Cohen’s d): SMD = 0.2 small, 0.5 medium, 0.8 large

t_value <- 2.5  # example t-value

n1 <- 30        # sample size in group 1

n2 <- 45        # sample size in group 2

SD1 <- 15       # standard deviation in group 1

SD2 <- 20       # standard deviation in group 2

# Compute pooled standard deviation

SD_pooled <- sqrt(((n1 - 1) * SD1^2 + (n2 - 1) * SD2^2) / (n1 + n2 - 2))

# Calculate the standard error of the difference between means

SE_diff <- sqrt(SD1^2 / n1 + SD2^2 / n2)

# Convert t-value to SMD

SMD <- t_value * SE_diff / SD_pooled

# Print the SMD

SMD

留言

這個網誌中的熱門文章

可轉移性、普遍性、代表性和外部有效性

頻率學派 vs 貝氏學派

貝氏分析計算器