get_functions {nlstac}R Documentation

Get nonlinear functions from a separable nonlinear formula

Description

Returns the nonlinear functions of a formula as charater strings.

Usage

get_functions(form, lp)

Arguments

form

Either a string in the form 'y ~ ...' or an object of formula class

lp

A string array with the names of the linear parameters contained in the formula as obtained with get_parameters function

Details

This is an internal function used by nls_tac. A separable nonlinear formula is of the form

y ~ a_1 f_1(x;p) + a_2 f_2(x;p) + \ldots + a_n f_n(x;p),

where f_1,..., f_n are general nonlinear functions, a_1,...,a_n, are the linear coefficients and p is the vector of nonlinear parameters. The formula given in the input should be of this form and get_functions will return an array with the string expressions of functions f_i.

Value

An array containing the strings for the nonlinear functions of the formula.

Note

Also formulas of the form

y ~ a_1/f_1(x;p) + a_2/f_2(x;p) + \ldots

could be given.

Author(s)

Mariano Rodríguez-Arias (arias@unex.es). Deptartment of Mathematics

Juan Antonio Fernández Torvisco (jfernandck@alumnos.unex.es). Department of Mathematics

University of Extremadura (Spain)

Rafael Benítez (rafael.suarez@uv.es). Department of Business Mathematics

University of Valencia (Spain)


[Package nlstac version 0.2.0 Index]