max.level(n, L, boundary="periodic", base=2, decimate=T)
"periodic"
,
"infinite", "zero"
.
See
dwt
for a complete list of the available boundary rules.
base=2
.
FALSE
, the maximum decomposition level is found for
a
non-decimate
decomposition. If
decimate=TRUE
, the default,
the sample size, filter length and boundary rule determine which
algorithm is used. See details below.
If a
non-decimate
transform is requested (
decimate=F
),
then
max.level
is computed as
max.level = max( 0, log(n-1/L-1) )
where log is base 2.
Otherwise (
decimate=T
),
if the boundary rule is
"periodic"
,
max.level
is computed as
the largest value of
m
such that
n/2^m
is an integer
greater than or equal to
L
.
If the boundary rule is
"interval"
,
max.level
is computed as
the largest value of
m
such that
n/2^m
is an integer
greater than or equal to
3L-2
.
and if any other boundary rule is chosen (
"zero"
,
"polynomial"
,
"reflection"
, or
"infinite"
),
max.level
is computed as
max.level = max( 0, log(n/L)+1 )
where
log is base 2.
For cosine packet analysis, the
max.level
is computed by
max.level(n, 4)
.