TPMplt (version 0.1.2)

basicPF: Basic fitting function for stress-strain curve.

Description

Basic fitting function for stress-strain curve.

Usage

basicPF(x, y, subsec = NULL, lmoutput = FALSE, orderlist = NULL,
  SScurve = TRUE)

Arguments

x

Numeric vector as independent variable.

y

Numeric vector as dependent variable.

subsec

A numeric value or vector for setting the original functions as a multi-function in order to apply dynamic polynomial fitting one by one.

lmoutput

A boolean value to control the output of liner models for all subsections. Default value is FALSE.

orderlist

An integer vector to specify maximum order for each section. Default value NULL will use 7 in maximum for all sections.

SScurve

A boolean value to specify whether applying overall correction. Defualt value TRUE means not applied.

Value

A list contains independent variable and fitted dependent variable over the maximum value.

Examples

Run this code
# NOT RUN {
x <- TPMdata[,1]
y <- TPMdata[,2]

# Using 2 sections: start to x=0.3;
# x=0.3 to the end:
basicPF(x, y, subsec = 0.3)

# Using 3 sections: start to x=0.015;
# from 0.015 to 0.2; from 0.2 to the end:
basicPF(x, y, subsec = c(0.015, 0.2))

# Linear models output:
basicPF(x, y, subsec = c(0.015, 0.2), lmoutput=TRUE)
# }

Run the code above in your browser using DataLab