gof: Obtain Goodness of Fit Figures

Description Usage Arguments Details Value

View source: R/03_obtaining_gof.R

Description

Step Three: Obtain Goodness of Fit Figures for a set of computed models

Usage

1
gof(mfits, gof)

Arguments

mfits

A list with five components:

  1. models: A list with one or two elements. Each element has all possible model fits in it. Each element represents one distributional parameter.

  2. modelids: A character vector with model id's corresponding to the models. in the models element

  3. expl_names: names of explanatory variables (ungrouped case) or group names (grouped case).

  4. npar: Number of parameters which are modeled.

  5. method: One of "lm", "gamlss".

Best created by mfit.

gof

Goodness of fit which should be obtained for all models. Which is available depends on the method with which the models were computed. Currently:

  • lm method: "AIC", "r.squared", "loglik", "deviance"

  • gamlss method: "AIC", "deviance"

Details

This function takes a list generated by mfit to obtain all possible models and then exports a 'goodfit' object, used for further partitioning.

Value

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.