summarize_fit_output.Rd
The function first extracts the activity data based on the fit the supplied input parameters. In addition, summary of activity data (e.g., confidence interval, hit confidence) can be produced.
summarize_fit_output( d, thr_resp = 20, perc_resp = 10, ci_level = 0.95, extract_only = FALSE )
d | The output from the |
---|---|
thr_resp | The response cutoff to calculate the potency. Default = NULL. |
perc_resp | The percentage cutoff to calculate the potency. Default = NULL. |
ci_level | The confidence level for the activity metrics. Default is = 0.95. |
extract_only | Whether act_summary data should be produced. Default = FALSE. |
A list of named components: result and result_nested (and act_summary).
The result and result_nested are the copy from the output of run_fit()
.
An act_set is added under the result component.
If (extract_only = FALSE), an act_summary is added.
A tibble, act_set is generated. When (extract_only = FALSE), a tibble, act_summary is generated with confidence intervals of the activity metrics. The quantile approach is used to calculate the confidence interval. For potency activity metrics, if value is NA, highest tested concentration is used in the summary. For other activity metrics, if value is NA, 0 is used in the summary.
# generate some fit outputs ## fit only fitd1 <- run_fit(zfishbeh) ## fit + bootstrap samples fitd2 <- run_fit(zfishbeh, n_samples = 3) # \donttest{ # only to extract the activity data sumd1 <- summarize_fit_output(fitd1, extract_only = TRUE) # calculate EC20 instead of default EC10 sumd1 <- summarize_fit_output(fitd1, extract_only = TRUE, perc_resp = 20) # calculate POD using a higher noise level (e.g., 40) ## this number depends on the response unit sumd1 <- summarize_fit_output(fitd1, extract_only = TRUE, thr_resp = 40) # calculate confidence intervals based on the bootstrap samples sumd2 <- summarize_fit_output(fitd2) # }