goodfit: Create a goodfit object

Description Usage Arguments Details Value

View source: R/03_as_goodfit.R


Takes goodness of fit figures and outputs a goodfit object for further partitioning with part.


goodfit(gofs, model_ids, expl_names, npar = 1, method = "unknown", gof)



A list with either one or two components, depending on whether two parameters (e.g. mu and sigma) have to be modeled, or just one (most cases). The first element is a vector called 'mu' holding the goodness of fit numbers as a numeric vector. If a second parameter is also modeled, the second element is called 'sigma'.


A character vector of the same length as gofs$mu. Is used for indexing the gof vectors, so it has to be in the right order compared to gofs.


A character vector with the variable or variable group names.


Number of parameters for which patitioning should be done. Defaults to 1. Has to have the same length as gofs


Method from which the goodnesses of fit were extracted. Not of importance for partitioning so it defaults to "unknown".


Name of the goodness of fit measure which was extracted from the model. Is used for plot_ghp.


Use this function if you have models and/or goodness of fit figures which are not yet implemented in ghp but still shall be partitioned with part.


A gof object (type list), which has the following elements:

  1. gofs: A list with npar elements, each being a vector with the goodness of fits of the models.

  2. model_ids: A character vector with id's of the models: e.g. "x0", "x1", ...

  3. expl_names: Names of explanatory variables (grouped) or names of groups (grouped).

  4. npar Number of modeled paramateters. Can be 1 or 2.

  5. method: The method used to compute models. Can be one of "lm" or "gamlss".

  6. gof: A single character depicting the goodness of fit that was extracted.

Stan125/ghp documentation built on May 14, 2019, 10:32 a.m.