Subsetting method for mmkin objects.

# S3 method for mmkin
[(x, i, j, ..., drop = FALSE)

Arguments

x

An mmkin object

i

Row index selecting the fits for specific models

j

Column index selecting the fits to specific datasets

...

Not used, only there to satisfy the generic method definition

drop

If FALSE, the method always returns an mmkin object, otherwise either a list of mkinfit objects or a single mkinfit object.

Value

An object of class mmkin.

Examples

# Only use one core, to pass R CMD check --as-cran fits <- mmkin(c("SFO", "FOMC"), list(B = FOCUS_2006_B, C = FOCUS_2006_C), cores = 1, quiet = TRUE) fits["FOMC", ]
#> dataset #> model B C #> FOMC List,36 List,36 #> attr(,"class") #> [1] "mmkin"
fits[, "B"]
#> dataset #> model B #> SFO List,36 #> FOMC List,36 #> attr(,"class") #> [1] "mmkin"
fits["SFO", "B"]
#> dataset #> model B #> SFO List,36 #> attr(,"class") #> [1] "mmkin"
head( # This extracts an mkinfit object with lots of components fits[["FOMC", "B"]] )
#> $par #> parent_0 log_alpha log_beta sigma #> 99.666193 2.549849 5.050586 1.890202 #> #> $objective #> [1] 28.58291 #> #> $convergence #> [1] 0 #> #> $iterations #> [1] 21 #> #> $evaluations #> function gradient #> 25 76 #> #> $message #> [1] "both X-convergence and relative convergence (5)" #>