get_coefficient_model: Model Generation

Description Usage Arguments Details Value

View source: R/modelbuilding.R

Description

Creates a best fit of coefficients for a given data set.

Usage

1
2
3
4
5
6
7
8
get_coefficient_model(
  data,
  ranges,
  output_name,
  add = FALSE,
  order = 2,
  u_form = NULL
)

Arguments

data

A data.frame containing the input and output values

ranges

A named list consisting of the ranges of the input parameters

output_name

A string corresponding to the output to be modelled

add

Should we perform stepwise add or stepwise delete? Default: FALSE

order

To what order terms should the model be fitted? Default: 2 (quadratic)

u_form

An upper form for the model fit. Default NULL; used internally.

Details

There are two ways to generate the model; either start with all possible terms (including cross-terms) up to order n, and then stepwise remove them; or start with an intercept and stepwise add terms up to order n, only retaining a term if the Information Criterion is improved. Which method is chosen is dependent on the value of add; in the event where add = FALSE and there are not enough degrees of freedom to start with all possible terms, a warning will be given.

Value

The fitted model


Tandethsquire/emulatorr documentation built on April 12, 2021, 1:08 a.m.