Package 'lacunarity'

Title: Standard and Generalized Lacunarity for Binary Time Series
Description: Estimates lacunarity and generalized lacunarity for unidimensional binary time series. The lacunarity index summarizes the similarity of parts from different regions of a series at a given scale by averaging the behavior of variable size structures of zeros and ones. The generalized lacunarity concept provides an enhanced measure of the organization of the gaps over all measured scales and over the different arrangements of smaller and larger gaps in the series.
Authors: Ikaro Barreto [aut, cre]
Maintainer: Ikaro Barreto <[email protected]>
License: GPL (>= 2)
Version: 0.1.0
Built: 2026-06-04 08:39:25 UTC
Source: https://github.com/ikarobarreto/lacunarity

Help Index


Generalized lacunarity of a binary series

Description

Computes the generalized (multifractal-like) lacunarity Λq(s)\Lambda_q(s) of a binary time series and the spectrum of scaling exponents γ(q)\gamma(q).

Usage

genlac(x)

Arguments

x

a binary vector of 0's and 1's.

Details

The ordinary lacunarity is extended to an arbitrary moment order qq by

Λq(s)=[Z(2q,s)Z(q,s)2]1/q,\Lambda_q(s) = \left[ \frac{Z(2q,s)}{Z(q,s)^2} \right]^{1/q},

where Z(q,s)Z(q,s) is the qq-th moment of the gliding-box mass distribution at scale ss. Large positive qq emphasises dense boxes and negative qq emphasises sparse boxes, so the curve qγ(q)q \mapsto \gamma(q), with γ(q)\gamma(q) the slope of log10Λq(s)\log_{10}\Lambda_q(s) on log10s\log_{10} s, describes how gaps of different magnitudes scale. Orders qq range over {10,,10}{0}\{-10, \dots, 10\} \setminus \{0\}.

Value

A list with components:

s

the dyadic box scales s=2is = 2^i.

q

the moment orders.

yq

the generalized scaling exponents γ(q)\gamma(q).

Dqs

the matrix of generalized lacunarities Λq(s)\Lambda_q(s) (rows index q, columns index s).

References

Vernon-Carter, J., Lobato-Calleros, C., Escarela-Perez, R., Rodriguez, E. and Alvarez-Ramirez, J. (2009). A suggested generalization for the lacunarity index. Physica A, 388(20), 4305-4314.

Allain, C. and Cloitre, M. (1991). Characterizing the lacunarity of random and deterministic fractal sets. Physical Review A, 44(6), 3552-3558.

See Also

lac for the ordinary lacunarity index.

Examples

x <- rbinom(1000, 1, 0.85)
genlac(x)

Lacunarity index of a binary series

Description

Computes the gliding-box lacunarity index Λ(s)\Lambda(s) of a binary time series across dyadic scales, together with its scaling exponent.

Usage

lac(x)

Arguments

x

a binary vector of 0's and 1's.

Details

A box of size ss is slid one observation at a time along the series and its mass mm (the number of ones it covers) is recorded. Writing Z(q,s)Z(q,s) for the qq-th moment of the resulting box-mass distribution, the lacunarity index is

Λ(s)=Z(2,s)Z(1,s)2=1+Var(m)mean(m)2,\Lambda(s) = \frac{Z(2,s)}{Z(1,s)^2} = 1 + \frac{\mathrm{Var}(m)}{\mathrm{mean}(m)^2},

so that Λ(s)1\Lambda(s) \ge 1, with equality only for a translationally homogeneous pattern. Larger values indicate gappier, more heterogeneous textures. The scaling exponent y is the slope of log2Λ(s)\log_2 \Lambda(s) regressed on log2s\log_2 s. Scales are dyadic, s=2is = 2^i, and capped by the longest run of ones.

Value

A list with components:

y

the lacunarity scaling exponent γ\gamma.

Ds

the lacunarity Λ(s)\Lambda(s) at each scale.

s

the dyadic box scales s=2is = 2^i.

References

Allain, C. and Cloitre, M. (1991). Characterizing the lacunarity of random and deterministic fractal sets. Physical Review A, 44(6), 3552-3558.

Plotnick, R. E., Gardner, R. H., Hargrove, W. W., Prestegaard, K. and Perlmutter, M. (1996). Lacunarity analysis: a general technique for the analysis of spatial patterns. Physical Review E, 53(5), 5461-5468.

See Also

genlac for the generalized lacunarity spectrum.

Examples

x <- rbinom(1000, 1, 0.85)
lac(x)