
Summarize an amerasfit Object
summary.RdProduces a summary of a fitted amerasfit object, including
parameter estimates, standard errors, and confidence intervals if
computed via confint.
Arguments
- object
A fitted model object of class
amerasfit, as returned byameras.- x
An object of class
summary.amerasfit, as returned bysummary.amerasfit.- digits
The number of significant digits to use. Defaults to
max(3, getOption("digits") - 3).- ...
Additional arguments, currently unused.
Value
summary.amerasfit returns an object of class
summary.amerasfit, which is a list containing the following
elements:
callThe matched call from the original call to
ameras.summary_tableA data frame with one row per parameter per method, containing columns:
MethodThe estimation method (RC, ERC, MCML, FMA, or BMA).
TermThe parameter name.
EstimateThe parameter estimate.
SEThe standard error.
CI.lowerThe lower confidence bound, if confidence intervals have been computed via
confint.CI.upperThe upper confidence bound, if confidence intervals have been computed via
confint.pval.lowerp-value associated with the lower bound of the profile likelihood CI, the assess validity of the obtained bound. Only included if profile likelihood confidence intervals were computed via
confint.pval.upperp-value associated with the upper bound of the profile likelihood CI, the assess validity of the obtained bound. Only included if profile likelihood confidence intervals were computed via
confint.RhatThe Gelman-Rubin convergence diagnostic, included only when BMA results are present. Values above 1.05 indicate potential convergence problems.
n.effThe effective sample size, included only when BMA results are present.
runtime_tableA data frame with columns
MethodandRuntime, reporting the computation time in seconds for each method.total_runtime_secondsThe total computation time in seconds across all methods.
CI.computedLogical.
TRUEif confidence intervals have been computed viaconfint,FALSEotherwise.
Details
summary.amerasfit collects results from all estimation methods
present in the fitted object into a single summary table. Columns for
confidence intervals are only printed if they have been computed by
confint. When BMA results are present
in the fitted object, the summary table includes columns Rhat and
n.eff, with NA values for all other methods.
Printing the summary prints the original call to ameras, the runtime
(total and by method), and the table described above. This table can also
be accessed directly (i.e., to retrieve confidence intervals) using
summary_table.
Examples
data("data", package = "ameras")
## Fit the model
fit <- ameras(Y.binomial~dose(V1:V10, model="ERR"), data = data, family = "binomial",
methods = "RC")
#> Fitting RC
## Summary without confidence intervals
summary(fit)
#> Call:
#> ameras(formula = Y.binomial ~ dose(V1:V10, model = "ERR"), data = data,
#> family = "binomial", methods = "RC")
#>
#> Total run time: 0 seconds
#>
#> Runtime in seconds by method:
#>
#> Method Runtime
#> RC 0.0
#>
#> Summary of coefficients by method:
#>
#> Method Term Estimate SE
#> RC (Intercept) -0.8847 0.07378
#> RC dose 0.8020 0.13751
#>
#> Note: confidence intervals not yet computed. Use confint() to add them.
#>
## Summary with confidence intervals
fit <- confint(fit, method = "wald.orig")
#> Obtaining profile likelihood CI for dose
#> RC confidence intervals:
#>
#> lower upper pval.lower pval.upper iter.lower iter.upper
#> dose 0.5648 1.112 0.05024 0.04959 5 4
#>
summary(fit)
#> Call:
#> ameras(formula = Y.binomial ~ dose(V1:V10, model = "ERR"), data = data,
#> family = "binomial", methods = "RC")
#>
#> Total run time: 0 seconds
#>
#> Runtime in seconds by method:
#>
#> Method Runtime
#> RC 0.0
#>
#> Summary of coefficients by method:
#>
#> Method Term Estimate SE CI.lower CI.upper pval.lower pval.upper
#> RC (Intercept) -0.8847 0.07378 NA NA NA NA
#> RC dose 0.8020 0.13751 0.5648 1.112 0.05024 0.04959
#>
## Access the summary table directly
s <- summary_table(fit)
## Multiple methods
# \donttest{
fit2 <- ameras(Y.binomial~dose(V1:V10, model="ERR"), data = data, family = "binomial",
methods = c("RC", "ERC", "MCML"))
#> Fitting RC
#> Fitting ERC
#> Fitting MCML
fit2 <- confint(fit2, method = "wald.orig")
#> Obtaining profile likelihood CI for dose
#> Obtaining profile likelihood CI for dose
#> Obtaining profile likelihood CI for dose
#> RC confidence intervals:
#>
#> lower upper pval.lower pval.upper iter.lower iter.upper
#> dose 0.5648 1.112 0.05024 0.04959 5 4
#>
#> ERC confidence intervals:
#>
#> lower upper pval.lower pval.upper iter.lower iter.upper
#> dose 0.5728 1.144 0.04953 0.04819 6 4
#>
#> MCML confidence intervals:
#>
#> lower upper pval.lower pval.upper iter.lower iter.upper
#> dose 0.5554 1.098 0.05008 0.04957 5 4
#>
summary(fit2)
#> Call:
#> ameras(formula = Y.binomial ~ dose(V1:V10, model = "ERR"), data = data,
#> family = "binomial", methods = c("RC", "ERC", "MCML"))
#>
#> Total run time: 12 seconds
#>
#> Runtime in seconds by method:
#>
#> Method Runtime
#> RC 0.0
#> ERC 11.7
#> MCML 0.3
#>
#> Summary of coefficients by method:
#>
#> Method Term Estimate SE CI.lower CI.upper pval.lower pval.upper
#> RC (Intercept) -0.8847 0.07378 NA NA NA NA
#> RC dose 0.8020 0.13751 0.5648 1.112 0.05024 0.04959
#> ERC (Intercept) -0.8849 0.07477 NA NA NA NA
#> ERC dose 0.8214 0.14304 0.5728 1.144 0.04953 0.04819
#> MCML (Intercept) -0.8758 0.07323 NA NA NA NA
#> MCML dose 0.7910 0.13644 0.5554 1.098 0.05008 0.04957
#>
# }