Learn R Programming

rSFA (version 1.5)

sfaNlRegress: Perform non-linear regression

Description

Given the data in arg, expand them nonlinearly in the same way as it was done in the SFA-object sfaList (expanded dimension M) and search the vector RCOEF of M constant coefficients, such that the sum of squared residuals between a given function in time FUNC and the function R(t) = (v(t) - v0)' * RCOEF, t=1,...,T, is minimal

Usage

sfaNlRegress(sfaList, arg, func)

Arguments

sfaList

A list that contains all information about the handled sfa-structure

arg

Input data, each column a different variable

func

(T x 1) the function to be fitted nonlinearly

Value

returns a list res with elements

res$R

(T x 1) the function fitted by NL-regression

res$rcoef

(M x 1) the coefficients for the NL-expanded dimensions