This function calculates the long-run parameters of a KARDL model estimated
using the kardl function. The long-run parameters are calculated by
dividing the negative of the coefficients of the independent variables by
the coefficient of the dependent variable. If an intercept is included in
the model, it is also standardized by dividing it by the negative of the
long-run parameter of the dependent variable.
Value
An object of class kardl_long_run, which is a list containing:
coefficients: A named vector of long-run multipliers.residuals: A vector of residuals from the long-run model.effects: A vector of effects from the long-run model.rank: The rank of the long-run model.fitted.values: A vector of fitted values from the long-run model.assign: A vector indicating the assignment of coefficients to terms in the long-run model.qr: The QR decomposition of the design matrix of the long-run model.df.residual: The degrees of freedom of the residuals of the long-run model.xlevels: A list of factor levels used in the long-run model.call: The matched call used to create the long-run model.terms: The terms object of the long-run model.model: The data frame used in the long-run model.
Details
The function also calculates the standard errors of the long-run multipliers using the delta method, which accounts for the covariance between the coefficients. The fitted values and residuals of the long-run model are calculated based on the original data and the long-run multipliers.
The function returns an object of class kardl_long_run, which contains
the long-run multipliers, their standard errors, t-statistics, p-values,
fitted values, residuals, and other relevant information for further
analysis and diagnostics.
Note that the fitted values and residuals from the long-run model are not centered (i.e., they do not have a mean of zero) by design, which means that diagnostic plots and residual-based tests may not be valid for this model. The primary focus of this function is on the estimation of the long-run multipliers and their associated statistics.
The long-run multipliers are calculated using the formula: $$LRM_i = -\frac{\eta_i}{\eta_0}$$.
t-values and p-values are calculated using the standard errors obtained from the delta method, which accounts for the covariance between the coefficients. Delta method formula for standard errors of long-run multipliers: $$SE(LR_i) = \sqrt{(A^2) \cdot Var(\eta_i) + 2 \cdot A \cdot B \cdot Cov(\eta_i, \eta_0) + (B^2) \cdot Var(\eta_0)}$$ where $$A = \frac{\partial LRM_i}{\partial \eta_i} = -\frac{1}{\eta_0}$$ and $$B = \frac{\partial LRM_i}{\partial \eta_0} = \frac{\eta_i}{\eta_0^2}$$. Hence, \(\eta_i\) is the coefficient of the independent variable and \(\eta_0\) is the coefficient of the dependent variable in the original KARDL model.
Examples
kardl_model <- kardl(
DriversKilled ~ PetrolPrice + drivers + asym(PetrolPrice) +
deterministic(law) + trend,
Seatbelts,
mode = c(1, 2, 3, 0)
)
long <- kardl_longrun(kardl_model)
#> Warning: Coefficients, standard errors, t-statistics and p-values are reliably estimated.
#> Fitted values and residuals are NOT centered (E(u) ≠ 0 by design) → diagnostic plots and residual-based tests are invalid.
# Calculate the long-run multipliers
long
#>
#> Call:
#> kardl_longrun.kardl_lm(kardl_model = kardl_model)
#>
#> Coefficients:
#> L1.PetrolPrice_POS L1.PetrolPrice_NEG L1.drivers
#> -14.9912 -66.9849 0.0786
#>
# Details of the long-run multipliers
summary(long)
#> Call:
#> kardl_longrun.kardl_lm(kardl_model = kardl_model)
#>
#>
#> Estimation type:
#> Long-run multipliers
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> L1.PetrolPrice_POS -14.9912274 87.7377465 -0.1709 0.8645
#> L1.PetrolPrice_NEG -66.9848916 171.4328226 -0.3907 0.6965
#> L1.drivers 0.0785960 0.0040583 19.3670 <2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# Using magrittr
library(magrittr)
Seatbelts %>%
kardl(
DriversKilled ~ PetrolPrice + drivers + asym(PetrolPrice) +
deterministic(law) + trend,
mode = c(1, 2, 3, 0), data = .
) %>%
kardl_longrun() %>%
summary()
#> Warning: Coefficients, standard errors, t-statistics and p-values are reliably estimated.
#> Fitted values and residuals are NOT centered (E(u) ≠ 0 by design) → diagnostic plots and residual-based tests are invalid.
#> Call:
#> kardl_longrun.kardl_lm(kardl_model = .)
#>
#>
#> Estimation type:
#> Long-run multipliers
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> L1.PetrolPrice_POS -14.9912274 87.7377465 -0.1709 0.8645
#> L1.PetrolPrice_NEG -66.9848916 171.4328226 -0.3907 0.6965
#> L1.drivers 0.0785960 0.0040583 19.3670 <2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1