nEffective function

Estimate the effective sample size from longitudinal data