GOF_model_test {bootGOF}R Documentation

R6 Class representing the Goodness-of-Fit test for (linear) models.

Description

This class can test the null hypothesis that data follows a particular linear model, i.e. classical linear models, generalized linear models or models of the type m(β^\top X) + ε.

Methods

Public methods


Method new()

Usage
GOF_model_test$new(
  model,
  data,
  nmb_boot_samples,
  y_name,
  Rn1_statistic,
  gof_model_info_extractor,
  gof_model_resample
)
Arguments
model

a fitted model

data

used to fit model

nmb_boot_samples

integer specifying the number of bootstrap samples to perform

y_name

string specifying the name of the dependent variable in in data

Rn1_statistic

statistic used to map the marked empirical process to the real line. Needs to be an instance of the class that implements Rn1_statistic

gof_model_info_extractor

an instance that implements GOF_model_info_extractor in order to apply it to model

gof_model_resample

an instance that implements GOF_model_resample in order to apply it to model

Returns

An instance of the Class


Method get_Rn1_org()

calculates the marked empricial process for model

Usage
GOF_model_test$get_Rn1_org()
Returns

vector ordered by the inner product of the estimated parameter and the independent variables


Method get_Rn1_boot()

calculates the marked empricial process for the resampled versions of model

Usage
GOF_model_test$get_Rn1_boot()
Returns

list of length nmb_boot_samples where every element is a vector ordered by the inner product of the estimated parameter and the dependent variables


Method get_pvalue()

p-value for Goodness-of-Fit-test for model

Usage
GOF_model_test$get_pvalue()
Returns

p-value for the null hypothesis that the dependent variable was generated according to model


Method clone()

The objects of this class are cloneable with this method.

Usage
GOF_model_test$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package bootGOF version 0.1.0 Index]