I updated pbsLag() to allow negative lags. This may be useful, for example, when predicting sockeye recruits from spawners. If both are indexed by brood year, then the 0 lag of spawners corresponds to the brood spawners for a given set of recruits. Negative spawner lags may be useful up to and including the -2 lag of spawners, which falls one year before the age 3 sockeye recruit.
Because this changes the allowed lag structure, it would be a good idea to double check that pbsEDM() still handles disallowed points correctly, especially for non-sequential lags. I will take a look into this.
I updated
pbsLag()to allow negative lags. This may be useful, for example, when predicting sockeye recruits from spawners. If both are indexed by brood year, then the 0 lag of spawners corresponds to the brood spawners for a given set of recruits. Negative spawner lags may be useful up to and including the -2 lag of spawners, which falls one year before the age 3 sockeye recruit.Because this changes the allowed lag structure, it would be a good idea to double check that
pbsEDM()still handles disallowed points correctly, especially for non-sequential lags. I will take a look into this.