reg_asym {stressor}R Documentation

Asymptotic Regression

Description

A simple example of asymptotic regression that is in the form of y = -e^{-x} and is the sum of multiple of these exponential functions with a common intercept term.

Usage

reg_asym(
  formula,
  data,
  method = "BFGS",
  init_guess = rep(1, ncol(data) * 2 - 1),
  ...
)

Arguments

formula

A formula object to describe the relationship.

data

The response and predictor variables.

method

The method that is passed to the optim function. By default, it is the BFGS method which uses a gradient.

init_guess

The initial parameter guesses for the optim function. By default, it is all ones.

...

Additional arguments passed to the optim function.

Value

A "reg_asym" object is returned which contains the results from the optim function that was returned.

Examples

 asym_data <- data_gen_asym(10)
 reg_asym(Y ~ ., asym_data)

[Package stressor version 0.2.0 Index]