# Example with the data referring to the log fluctuation
#channel curve data calculated for an epileptic subject
#extracted in the Physionet platform.
library(DFA)
data("EEGsignal")
x<-EEGsignal$`log10(boxes)`
y<-EEGsignal$`log10(DFA)`
plot(x,y,xlab="log10(boxes)",ylab="log10(DFA)")
secant(x,y,npoint=2,size_fit=8)
# Example with crossover point fixed in position=20.
library(DFA)
part1 <- seq(1,20)
part2 <- seq(20,1)
y = c(part1,part2)
x<-seq(1,40)
plot(x,y)
secant(x,y,npoint=1,size_fit=8)
Run the code above in your browser using DataLab