Dear Franklin Bretschneider,

Thank you so much for your reply and explanation about the filter using the
stats and signal package.

I decided to opt the filter method in signal package. I have a simple
question about the cut off frequency here.

I have 30 minute collected tidal data and I want to use the 48 hour low
pass filter to my data to remove the fluctuations and then get only the
residuals. What should be the cutoff frequency in my case ? I have tried to
figure out cut off frequency with the following rationale : .

The parameters for butter filter are n, Wn and type. In the help, W is
defined as critical frequencies of the filter. W must be a scalar for
low-pass and high-pass filters, and W must be a two-element vector c(low,
high) specifying the lower and upper bands. For digital filters, W must be
between 0 and 1 where 1 is the Nyquist frequency.

A value of 1 corresponds to half the sampling frequency. In my case the
sampling frequency is 2 hr^-1. Hence a value of 0.01 corresponds to a
frequency cutoff of .01*1 = .01 hr^-1 or 100 hrs time. Using unitary
method, if 100 hours cut off frequency is 0.01 then 48 hours cut off
frequency is 0.01/100*48 = 0.0048 hr^-1 . Is that correct ?

Thank you so much

Janesh





On Thu, Feb 7, 2013 at 6:07 AM, Bretschneider SIG-R <bretschr@xs4all.nl>wrote:

>
> Dear Janesh Devkota,
>
>
>
> Sorry, I forgot an edit.
> The last command should read:
>
> yfiltered = signal:::filter(myfilter, y) # apply filter
>
> Best wishes,
>
>
>
> Franklin Bretschneider
>
>
> --
> Dept Biologie
> Kruytgebouw W711
> Padualaan 8
> 3584 CH Utrecht
> The Netherlands
>
>
>
>
>
>

	[[alternative HTML version deleted]]

