SSexp {nlrwr}R Documentation

Self starter function for the exponential model

Description

This function is a self starter function for use with nls and related functions.

Usage

SSexp(predictor, y0, b)

Arguments

predictor a numeric vector of predictor values
y0 a numeric parameter representing the reponse level at predictor=0
b a numeric parameter related to the speed of the exponential changes

Details

The self starter function relies on linearization of the mean function and subsequently ordinary least squares is applied.

Value

A numeric vector of the same length as predictor containing the mean function y0exp(x/b) evaluated in x for the provided predictor values.

Author(s)

Christian Ritz

Examples


## self starter converges in 2 iterations
RGRcurve.m1 <- nls(RGR ~ SSexp(Day, y0, b), data=RGRcurve)
summary(RGRcurve.m1)

## plinear needs a few interations more
RGRcurve.m2 <- nls(RGR ~ exp(Day/b), data=RGRcurve, algorithm="plinear", start=list(b=1))
summary(RGRcurve.m2)


[Package nlrwr version 1.0-6 Index]