rcl.s: Simple Line-Splitting Function

View source: R/rcl.s.R

rcl.sR Documentation

Simple Line-Splitting Function

Description

'rcl.s' is used to find the input values under which a user-supplied function outputs a specified value by searching on a user-specified interval

Usage

rcl.s(FNS, ..., y_goal = .Machine$double.neg.eps^0.5, 
      x_lo = .Machine$double.neg.eps^0.25, 
      x_up = 1 - .Machine$double.neg.eps^0.25, 
      s_tol = .Machine$double.neg.eps^0.5, 
      s_mit = 1e2, trace_plot = FALSE)

Arguments

FNS

user-supplied function. Must input only a single number and output only a single number.

...

arguments passed to the user-supplied function.

y_goal

the goal output value.

x_lo

the lower endpoint of the interval for the input value.

x_up

the upper endpoint of the interval for the input value.

s_tol

tolerance value for convergence diagnostic. If the absolute value of the difference between the output value at the current iteration and the goal output value is less than this tolerance value the algorithm terminates successfully.

s_mit

maximum number of iterations.

trace_plot

logical: return also a traceplot?

Value

A dataframe with the following columns:

pi

input values.

lr

output values.

If trace_plot = TRUE also a plot.

Author(s)

Juraj Medzihorsky


jmedzihorsky/pistar documentation built on June 4, 2022, 9:58 a.m.