Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from AndersenLab/fix_infinite_ci
Browse files Browse the repository at this point in the history
add point estimate if infinite
  • Loading branch information
samwachspress committed Jun 28, 2021
2 parents 251f273 + cc0e094 commit 3802b4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion H2_script.R
Expand Up @@ -464,7 +464,13 @@ processed_data <- process_phenotypes(data, summarize_replicates = "none") %>%
dplyr::rename(Strain = strain, Value = phenotype, TraitName = trait)

# Run H2 calculation
result <- H2.calc(processed_data, boot = T, type = "broad")
result <- NULL
result <- H2.calc(processed_data, boot = T, type = "broad", reps = 500)

# if result doesn't converge, just give point estimate...
if(is.null(result)) {
result <- H2.calc(processed_data, boot = F, type = "broad")
}

# add timepoint data
result$hash <- hash
Expand Down

0 comments on commit 3802b4d

Please sign in to comment.