Skip to content

Commit

Permalink
Adding new diagnostic to sim outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Oct 31, 2024
1 parent 188a18d commit c985386
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extras/EndOfObsSimulations.R
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,15 @@ for (i in seq_along(scenarios)) {
mutate(coverage = ci95Lb < scenario$trueRr & ci95Ub > scenario$trueRr,
diagnosticEstimate = log(diagnosticEstimate),
failDiagnostic = diagnosticP < 0.05,
failDiagnosticAndEs = diagnosticP < 0.05 & exposureStabilityP < 0.05,
diagnostic2Estimate = log(diagnostic2Estimate),
failDiagnostic2 = diagnostic2Lb > log(1.25) | diagnostic2Ub < log(0.75)) |>
summarise(coverage = mean(coverage, na.rm = TRUE),
bias = mean(logRr - log(scenario$trueRr), na.rm = TRUE),
meanDiagnosticEstimate = exp(mean(diagnosticEstimate, na.rm = TRUE)),
fractionFailingDiagnostic = mean(failDiagnostic, na.rm = TRUE),
meanExposureStabilityEstimate = exp(mean(log(exposureStabilityEstimate), na.rm = TRUE)),
fractionFailingDiagnosticAndEs = mean(failDiagnosticAndEs, na.rm = TRUE),
meanDiagnostic2Estimate = exp(mean(diagnostic2Estimate, na.rm = TRUE)),
fractionFailingDiagnostic2= mean(failDiagnostic2, na.rm = TRUE))
row <- as_tibble(scenarioKey) |>
Expand Down

0 comments on commit c985386

Please sign in to comment.