Description Usage Arguments Details Value Author(s) Examples
View source: R/encodeSmoothFunctionOrder2.R
Encodes a smooth function by its values and first derivatives. At each point on the abscissa the function is encoded into a two dimensional point. These points are represented as sequence of states
1 | encodeSmoothFunctionOrder2(smoothFunc, abscissa)
|
smoothFunc |
A smooth function, already converted into an |
abscissa |
A vector representing the x-axis or abscissa |
To use this function for a vector use the function createSmoothFD
to convert to a
fd
object.
For a smooth function f(x), the four possible states are as follows:
A=(1,1): (f>0, f'>0)
B=(1,0): (f>0, f'≤q 0)
C=(0,1): (f ≤q 0, f'> 0)
D=(0,0): (f≤q 0, f'≤q 0)
A string
of states representing the encoded form of the smooth function, example "AADDCCCB"
Subhrangshu Nandi, PhD Statistics; snandi@wisc.edu or nands31@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 | data( growth, package = 'fda')
Mat1 <- growth[['hgtm']]
Arguments <- growth[['age']]
Mean <- rowMeans( Mat1 )
MeanFD <- createSmoothFD(
curvesToSmooth = Mean,
abscissa = Arguments,
lambdas = exp( -5:5 ),
basisBreakFreq = 3,
basisOrder = 4,
pbasis = NULL )
MeanStates <- encodeSmoothFunctionOrder2( smoothFunc = (MeanFD$curvesSmooth)$fd, abscissa = Arguments )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.