Shrinkage estimator datacamp

source(url("https://github.com/guhjy/guhjy/raw/main/shrinkage.R"))

result <- shrinkage_estimator(b = 0.4, s = 0.3)

cat("收縮估計:", result$betahat, "\n")

cat("收縮估計的標準誤:", result$sigma_hat, "\n")

cat("95% 信賴區間: [", result$confidence_interval[1], ", ", result$confidence_interval[2], "]\n")

留言

這個網誌中的熱門文章

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

頻率學派 vs 貝氏學派

貝氏分析計算器