model_ols_gpm: Model with OLS and GPM Components

View source: R/model_ols_gpm.R

model_ols_gpmR Documentation

Model with OLS and GPM Components

Description

produces a model with Ordinary Least Squares (OLS) and Gaussian Process Model (GPM) components, based on input data provided in an Excel spreadsheet.

Usage

model_ols_gpm(
  myinputspreadsheet = NULL,
  myinputdatasheet = NULL,
  mypredictiondf = NULL,
  mytag = NULL,
  mypredictionsheet = NULL,
  myresponse_ols = NULL,
  myresponse_gpm = "residuals",
  myterms = NULL,
  sigmafrom = 0.01,
  sigmato = 2,
  sigmaby = 0.01,
  myfolds = 10,
  myseed1 = 123,
  myseed2 = 456,
  mygraphsize = 1000
)

Arguments

myinputspreadsheet

is the name of the spreadsheet with the input data.

myinputdatasheet

the name of the sheet with the input data.

mypredictiondf

(optional) a dataframe to be used as a basis for predictions

mytag

a character string that will be used in the output file names. #'

mypredictionsheet

(optional) the name of a sheet containing test data to which the model should be applied.

myresponse_ols

the name of the dependent variable for the OLS model

myresponse_gpm

the name of the dependent variable for the GPM model. This will normally be the residuals of the OLS model: "residuals".

myterms

a character vector containing the names of the independent variables.

sigmafrom

the lower limit of the test range for sigma

sigmato

the upper limit of the test range for sigma

sigmaby

the increment of the test values for sigma

myfolds

the number of folds for k-fold cross-validation

myseed1

the first random number seed

myseed2

the second random number seed

mygraphsize

the pixel dimension for the output graphs

Details

The spreadsheet requires at least one sheet, that must contain the dependent and independent variables.

Examples

myinputfile <- system.file("extdata", "model_ols_gpm_test.xlsx", package = "humblr")
mytestmodel <- model_ols_gpm(myinputspreadsheet = myinputfile, myinputdatasheet = "data", mypredictionsheet = "prediction_tests", mytag = "model_ols_gpm_test", myresponse_ols = "depvar", myresponse_gpm = "residuals", myterms = c("var2",	"var3",	"var4",	"var5",	"var6",	"var7",	"var8",	"var9",	"var10"), sigmafrom = 1, sigmato= 10, sigmaby = 1, myfolds = 10, myseed1 = 123, myseed2 = 456, mygraphsize = 1000)



alexmitrani/humblr documentation built on April 4, 2022, 8:29 a.m.