Skip to contents

Compute the degrees of freedom for the variance estimator

Usage

df_var(n, coef, exact_df = FALSE)

Arguments

n

number of observations

coef

moving average (moving_average()) used to filter the series.

exact_df

if TRUE compute the exact degrees of freedom for the t-distribution (when gaussian_distribution = FALSE), otherwise uses an approximation.

Value

Numeric value with the statistic (the degree is not necessary an integer).

See also

Examples

df_var(n = 100, coef = lp_filter(6)@sfilter)
#> [1] 63.68573