I have sampled my data at 2000 Hz and want to generate a fourth order low-pass zero-lag filter with a cut-off frequency of 150 Hz.
I have put the code below that I have created but I have the following questions. Given that I have used the filtfilt function do I need to change the number to “2” so that it is a second-order and should I also double the cut-off frequency i.e change “W” to 0.3 from 0.15.
‘’’rawdata = data$
bf = butter(4,0.15,type = c("low"), plane = c("z"))
filtereddata = filtfilt(bf, data$
Thank you in advance!