Learn R Programming

changeS (version 1.0.1)

fitS_linear: S-Curve Fit, Linear Models

Description

Estimation of location and magnitudes of change in intercept and slope, for piecewise linear models.

Usage

fitS_linear(dataIn,xColIndex=NULL,yColIndex=NULL,plotTitle = '')

Value

Object of class "fittedS_linear", with components:

b1

The pre-changepoint slope.

h1

The post-changepoint slope.

s1

S-curve slope for finding regression slope.

c

The changepoint.

b2

Pre-changepoint intercept.

h2

Post-changepoint intercept.

s2

S-curve slope for finding regression slope.

The gap at the changepoint is then

(h2 + h2 c) - (b2 + b1 c)

Arguments

dataIn

Data frame or equivalent.

xColIndex

Column number of "x" (typically time).

yColIndex

Column number of "y".

plotTitle

Title for output plot, if any.

Author

Lan Jiang, Collin Kennedy, Norm Matloff

Details

Linear model analog of fitS. Note: May have long run times.