View source: R/fitverse_batch.R
| fitverse_batch | R Documentation |
Applies fitverse() to every numeric column of a data frame
(or matrix, or named list), collects the results, and returns a tidy
summary table alongside the full list of fitted objects.
Use fitverse_batch() for automated data characterisation workflows,
survey-population profiling, or as a pre-processing step before optimal
stratification with stratifyR.
fitverse_batch(data,
cols = NULL,
dists = "all",
method = "MLE",
criterion = "AIC",
top_n = 3L,
plot = FALSE,
progress = NULL,
verbose = TRUE)
## S3 method for class 'fitverse_batch'
print(x, ...)
## S3 method for class 'fitverse_batch'
summary(object, ...)
data |
A |
cols |
Character vector of column names to process. If |
dists |
Distribution keys to try, or |
method |
Estimation method(s): |
criterion |
|
top_n |
Integer: number of top-ranked distributions stored in each fit.
Default |
plot |
Logical: produce and print a diagnostic plot for each variable?
Default |
progress |
Optional callback |
verbose |
Logical: print per-column progress messages? Default |
x, object |
An object of class |
... |
Currently unused. |
fitverse_batch() iterates over columns with a tryCatch()
wrapper so that a fitting failure for one column does not abort the
entire batch. Failed columns are collected in the failed element
of the returned object.
Column names containing spaces or special characters are handled correctly
via make.names() internally.
An S3 object of class "fitverse_batch" with elements:
fitsNamed list of "fitverse" objects, one per successfully fitted
column.
summaryData frame with one row per column, columns:
variable, n, best_dist, method,
AIC, BIC, loglik, KS_p, AD_p.
failedCharacter vector of column names for which fitting failed, or
character(0) if all succeeded.
criterionCharacter: the criterion used.
callThe matched call.
Karuna G. Reddy karuna.reddy@auckland.ac.nz
M. G. M. Khan mgm.khan@usp.ac.fj
fitverse for single-column fitting.
generate_report for producing a report from batch results.
# Fit all numeric columns of the airquality dataset
data(airquality)
batch <- fitverse_batch(airquality,
method = "MLE",
verbose = FALSE)
print(batch)
summary(batch)
# Access the fit for the Ozone column
batch$fits[["Ozone"]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.