Description Usage Arguments Details Value Author(s) Examples
View source: R/encodeSmoothFunction.R
Encodes a smooth function by its values, first and second derivatives. At each point on the abscissa the function is encoded into a three dimensional point. These points are represented as sequence of states
1 | encodeSmoothFunction(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 eight possible states are as follows:
A=(1,1,1): (f>0, f'>0, f''>0)
B=(1,0,1): (f>0, f'≤q 0, f''>0)
C=(1,1,0): (f>0, f'> 0, f''≤q 0)
D=(1,0,0): (f>0, f'≤q 0, f''≤q 0)
E=(0,1,1): (f≤q 0, f'> 0, f''>0)
G=(0,0,1): (f≤q 0, f'≤q 0, f''> 0)
H=(0,1,0): (f≤q 0, f'> 0, f''≤q 0)
I=(0,0,0): (f≤q 0, f'≤q 0, f''≤q 0)
A string
states representing the encoded form of the smooth function, example "AAHHFFFGGH"
Subhrangshu Nandi; 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 <- encodeSmoothFunction( smoothFunc = (MeanFD$curvesSmooth)$fd, abscissa = Arguments )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.