Learn R Programming

soundcorrs (version 0.1.1)

summary.list.multiFit: A comparison of the results produced by fitTable or multiFit.

Description

Take the output of fitTable or multiFit, extract a specific metric from the fits, and present them in the form of a table.

Usage

# S3 method for list.multiFit
summary(object, metric = "rss", ...)

Arguments

object

[list.multiFit] The output of fitTable or multiFit.

metric

[character] The metric to extract from object. Available metrics are: "aic", "bic", "rss", and "sigma". Defaults to "rss".

...

Unused; only for consistency with summary.

Value

A more human-friendly digest.

Examples

Run this code
# NOT RUN {
set.seed (27)
dataset <- data.frame (X=1:10, Y=(1:10)^2+runif(10,-10,10))
models <- list (
	"model A" = list (
		formula = "Y ~ X^a",
		start = list (list(a=100), list(a=1))),
	"model B" = list (
		formula = "Y ~ a*(X+b)",
		start = list (list(a=1,b=1)))
	)
summary (multiFit(models,dataset))
summary (fitTable(models,as.matrix(dataset),1,vec2df.rank), "sigma")
# }

Run the code above in your browser using DataLab