Skip to content
  • Sébastien Villemot's avatar
    Unary ops substitution: bugfix, actually restrict the substitution to the chosen equations · 5b80a4db
    Sébastien Villemot authored
    By default, the preprocessor is supposed to only do the “unary ops”
    transformation in the equations of VAR/PAC/trend component models.
    
    However, the implementation was slightly different so far. It would detect
    candidates to this transformation in the chosen equations, but it would then
    perform the substitution in *all* equations.
    
    This could lead for crashes, for example if the chosen equation contains
    log(X(-1)), but another (non-chosen) equation has log(X(-2)). Then this latter
    expression, even though it belongs to the same lag-equivalence class, is not
    properly handled, causing a segfault.
    
    Also do a few related cosmetic changes.
    5b80a4db