# acfmperiod

Python port of the original R package `acfMPeriod` for classical and robust
autocovariance/autocorrelation estimation using periodogram and M-periodogram
methods.

## Features

- Univariate and multivariate ACF/ACOVF from periodogram (`PerACF`)
- Robust ACF/ACOVF from M-periodogram (`MPerACF`)
- Periodogram and cross-periodogram estimators
- Covariance/correlation matrix wrappers at lag 0 (`CovCorPer`, `CovCorMPer`)
- Plotting support for robust and classical outputs

## Installation

```bash
pip install acfmperiod
```

For local development:

```bash
pip install -e .[dev]
```

## Quick Start

```python
import numpy as np
from acfmperiod import PerACF, MPerACF, CovCorPer

rng = np.random.default_rng(7)
x = rng.normal(size=(128, 2))

res = PerACF(x, lagmax=20, typevalue="correlation", doplot=False)
print(res.acf.shape)   # (20, 2, 2)

rob = MPerACF(x, lagmax=20, doplot=False)
cov0 = CovCorPer(x, typevalue="covariance")
print(cov0)
```

## API

- `PerioReg`, `MPerioReg`
- `CrossPeriodogram`, `MCrossPeriodogram`
- `PerACF`, `MPerACF`
- `CovCorPer`, `CovCorMPer`
- `plotrobacf`

Lowercase aliases are available without underscore naming.
ß