Conditional sampling within a model object?
Posted: Mon Jun 18, 2012 8:49 am
In a standard databanking routine I apply a lag effect to a discrete distribution to create several of my model inputs. Recently I have moved from using a single response curve to using a set of response curves with seasonal differences (Holiday and Non-Holiday). To explain the historical data, this has worked well; however, when working with forecasted assumptions, there appears to be no way to take a model object and apply the same logic.
Steps that I used to do:
1. Input_Series_LAG = Input Series_RAW * Input_Series_ResponseCurve + Input Series_RAW(-1) * Input_Series_ResponseCurve(1) + ... + Input Series_RAW(-n) * Input_Series_ResponseCurve(n)
2. In the model object for the Forecast, the ResponseCurve values were just put in by hand (long equation, but it worked)
Steps that I do now:
1. Input_Series_RAW_NH = Input_Series_RAW for a smpl @all if @month == m1 or @month = m2 {m1 and m2 are months in the NH period}
2. Input_Series_RAW_HD = Input_Series_RAW for a smpl @all if @month == m3 or @month = m4 {m3 and m4 are months in the HD period}
3. Input_Series_LAG_NH = Input Series_RAW_NH * Input_Series_ResponseCurve_NH + Input Series_RAW_NH(-1) * Input_Series_ResponseCurve_NH(1) + ... + Input Series_RAW_NH(-n) * Input_Series_ResponseCurve_NH(n)
3. Input_Series_LAG_HD = Input Series_RAW_HD * Input_Series_ResponseCurve_HD + Input Series_RAW_HD(-1) * Input_Series_ResponseCurve_HD(1) + ... + Input Series_RAW_HD(-n) * Input_Series_ResponseCurve_HD(n)
4. Input_Series_LAG = Input_Series_LAG_NH + Input_Series_LAG_HD (done as a group and a @rsum)
In the model object, I can't have an equation based on conditional sampling (or can I?, and if so, how?) so the original methodology breaks down, and my forecast assumptions either have to be hard coded or turned into some monstrosity I haven't wrapped my head around yet.
Looking at this, my question is really how do I make the Input_Series_RAW assumptions separate into two time dependent equations, so that if a different scenario assumption for Input_Series_RAW is put into place that the equation can handle the change?
Steps that I used to do:
1. Input_Series_LAG = Input Series_RAW * Input_Series_ResponseCurve + Input Series_RAW(-1) * Input_Series_ResponseCurve(1) + ... + Input Series_RAW(-n) * Input_Series_ResponseCurve(n)
2. In the model object for the Forecast, the ResponseCurve values were just put in by hand (long equation, but it worked)
Steps that I do now:
1. Input_Series_RAW_NH = Input_Series_RAW for a smpl @all if @month == m1 or @month = m2 {m1 and m2 are months in the NH period}
2. Input_Series_RAW_HD = Input_Series_RAW for a smpl @all if @month == m3 or @month = m4 {m3 and m4 are months in the HD period}
3. Input_Series_LAG_NH = Input Series_RAW_NH * Input_Series_ResponseCurve_NH + Input Series_RAW_NH(-1) * Input_Series_ResponseCurve_NH(1) + ... + Input Series_RAW_NH(-n) * Input_Series_ResponseCurve_NH(n)
3. Input_Series_LAG_HD = Input Series_RAW_HD * Input_Series_ResponseCurve_HD + Input Series_RAW_HD(-1) * Input_Series_ResponseCurve_HD(1) + ... + Input Series_RAW_HD(-n) * Input_Series_ResponseCurve_HD(n)
4. Input_Series_LAG = Input_Series_LAG_NH + Input_Series_LAG_HD (done as a group and a @rsum)
In the model object, I can't have an equation based on conditional sampling (or can I?, and if so, how?) so the original methodology breaks down, and my forecast assumptions either have to be hard coded or turned into some monstrosity I haven't wrapped my head around yet.
Looking at this, my question is really how do I make the Input_Series_RAW assumptions separate into two time dependent equations, so that if a different scenario assumption for Input_Series_RAW is put into place that the equation can handle the change?