globalfit-class: Class "globalfit"

Description Objects from the Class Slots Methods Author(s) See Also Examples

Description

The class globalfit handles return objects from globalfit. It contains for some given data a list of fitted distributions, their estimated parameters and supplementary information.

Objects from the Class

Objects can be created by calls of the form new("globalfit", data, continuity, method, fits). More comfortably, you may use the function globalfit. The result of these calls is a globalfit object.

Slots

call

the call, which created this object

data

vector of data points

continuity

logical; if TRUE, indicating that the data points come from a continuous distribution; if FALSE, indicating that they come from a discrete distribution

method

character; the method used for the fit.

fits

list of S4-objects of class optimParams

Methods

summary

signature(object = "globalfit"): summarizes the object and creates an object of globalfitSummary. Specify argument ic to choose how the results are to be sorted (as in method sort.

hist

signature(x = "globalfit"): computes a histogram of the given data points and plots it together with the density of the estimated best fit. Specify argument which to choose which fitted density to overlay: the number of the fit as returned by summary; i.e. which = 1 for the best fit, which = 2 for the second-best etc.
Default is 1.

print

signature(x = "globalfit"): applies the method summary and prints the result.

AIC

signature(x = "globalfit"): shows the AIC value of the fits. Specify argument n to display AIC for the n best fits according to this criterion.

BIC

signature(x = "globalfit"): shows the BIC value of the fits. Specify argument n to display BIC for the n best fits according to this criterion.

sort

signature(x = "globalfit"): sorts the results in slot fits by the information criterium selected. in argument ic. Available options are "AIC", "BIC" or "AICc".

Author(s)

Moritz Lauff, Kiril Dik, Nadine Tampe, Borui Niklas Zhu, Benedikt Geier, Moritz Kern

See Also

globalfitSummary
optimParams
globalfit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  data <- rnorm(n = 100, mean = 10, sd = 1)
  r <- globalfit(data, cores = if(interactive()) NULL else 2)
                 
  sort(r, ic = 'BIC')
    
  print(r)
  
  summary(r)
  summary(r, ic = 'AICc', n = 7)
      
  hist(r, ic = 'BIC', which = 4)
  
  AIC(r, n = 2)
  BIC(r)

DistributionFitR documentation built on March 13, 2020, 3:29 a.m.