printReport {fitteR} | R Documentation |
Prepare report of fitting
Description
Prepares a summary of the fitting as csv or shiny
Usage
printReport(x, file = NULL, type = "csv")
Arguments
x |
The output of |
file |
A character string giving the filename (including path) where the report should be printed |
type |
A character vector giving the desired type(s) of output |
Details
The routine generates a simple csv file, which is the most useful output in terms of reusability. However, the shiny output is more powerful and provides an overview of the statistics and a figure for visual/manual exploration of the fits. Irrspective of output type being “csv” or “shiny”, the fit-table has the following format
- package
package name
- distr
name of the distribution
- nargs
number of parameters
- args
names of parameters, comma-seperated list
- estimate
estimated values of parameters, comma-seperated list
- start
start values of parameters, comma-seperated list
- constraints
were constraints used, logical
- runtime
the runtime in milliseconds
- KS
test statistic $D$ of a two-sided, two-sample Kolmogorov-Smirnov test
- pKS
$P$-value of a two-sided, two-sample Kolmogorov-Smirnov test
- SW
test statistic of a Shapiro-Wilks test
- pSW
$P$-value of a Shapiro-Wilks test
Value
A list with items
table |
A |
shiny |
if |
Author(s)
Markus Boenn
Examples
# discrete empirical data
x <- rnbinom(100, 0.5, 0.2)
r <- fitter(x, dom="dis", posList=list(stats=NA))
# create only 'shiny' app
out <- printReport(r, type="shiny")
names(out)
## Not run: out$shiny
out <- printReport(r, type=c("csv")) # warning as 'file' is NULL,
str(out) # but table (data.frame) returned