Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/sufficient_stats_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,15 @@ update_variance_components.ss <- function(data, params, model, ...) {
}

# Region 1: Very dense near zero (tau2/100 to tau2/10)
small_grid <- exp(seq(log(mom_result$tau2/100), log(mom_result$tau2/10), length.out = 11))
small_grid <- exp(seq(log(mom_result$tau2/100), log(mom_result$tau2/10), length.out = 10))

# Region 2: Moderate density around tau2 (tau2/10 to tau2*3)
medium_grid <- exp(seq(log(mom_result$tau2/10), log(mom_result$tau2*3), length.out = 6))

# Region 3: Sparse coverage towards minimum sparse effect
large_grid <- exp(seq(log(mom_result$tau2*3), log(min_sparse_var), length.out = 3))

est_sa2 <- c(unique(c(small_grid, medium_grid, large_grid)))
est_sa2 <- c(0, unique(c(small_grid, medium_grid, large_grid)))

# Call mr.ash with residuals
mrash_output <- mr.ash.alpha::mr.ash(
Expand Down