Skip to content

Commit

Permalink
Fix bug using summary with multiple lags of single predictor
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-long committed Apr 21, 2019
1 parent ecd86cd commit afdf0e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/dpm.R
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,9 @@ setMethod("summary", "dpm",
}

# Combine info from variable transformations
a$var_coefs <- merge(a$var_coefs, a$v_info, by.y = "new_name", by.x = "var",
suffixes = c("", ".y"), all = TRUE)
a$var_coefs <- merge(a$var_coefs, a$v_info, by.y = c("new_name", "lag"),
by.x = c("var", "lag"),
suffixes = c("", ".y"), all.x = TRUE)
# Deal with constants not present in v_info
a$var_coefs$root[is.na(a$var_coefs$root)] <-
a$var_coefs$var[is.na(a$var_coefs$root)]
Expand Down

0 comments on commit afdf0e7

Please sign in to comment.