subscripting in "shift if true"
Posted: Wed Jun 01, 2005 6:39 pm
Hi,
I have a level called Providers that has two subscripts, province and age. Providers is the integral of two rates: global entries (going in), and exits (going out), both of which are also subscripted by province and age.
Also, using the 'shift if true' function, I have an aging chain set up to age everyone in the Providers level once a year. At least, I think I do. I have the 'shift is true'written as follows:
Provider Aging = shift if true(Providers[Province, a22], Time=integer(Time), ELMCOUNT(AGE), 0, Global Entry[Province, a22])
My understanding of the 'shift if true' function is that it shifts relative to the rightmost subscript of the variable of interest, so if I want to shift the ages of Providers, I should have it declared as Providers[province, age], and thus also have Entries[province, age] and Exits[province, age]. However, when I write them that way, I get the following error message:
"Subscript 1 of variable -Providers- is a member of the -age- family when it should be a member of the -province- family."
I get a similar error saying subscript 2 is -province- when it should be -age-, and I get the pair of errors again for Entries, Exits, and then again for Providers.
When I switch the order of the subscripts like so:
Providers[age, province]
Entries[age, province]
Exits[age, province]
Provider Aging=shift if true(Providers[a22, Province], Time=integer(Time), ELMCOUNT(AGE), 0, Global Entry[a22, Province])
(which, as I understand it, should not work as I'd be trying to 'age' based on the rightmost subscript, province), the model runs without errors (except to warn me that 'Provider Aging' is not used in the model), which confuses me.
What am I missing?
Thanks.
I have a level called Providers that has two subscripts, province and age. Providers is the integral of two rates: global entries (going in), and exits (going out), both of which are also subscripted by province and age.
Also, using the 'shift if true' function, I have an aging chain set up to age everyone in the Providers level once a year. At least, I think I do. I have the 'shift is true'written as follows:
Provider Aging = shift if true(Providers[Province, a22], Time=integer(Time), ELMCOUNT(AGE), 0, Global Entry[Province, a22])
My understanding of the 'shift if true' function is that it shifts relative to the rightmost subscript of the variable of interest, so if I want to shift the ages of Providers, I should have it declared as Providers[province, age], and thus also have Entries[province, age] and Exits[province, age]. However, when I write them that way, I get the following error message:
"Subscript 1 of variable -Providers- is a member of the -age- family when it should be a member of the -province- family."
I get a similar error saying subscript 2 is -province- when it should be -age-, and I get the pair of errors again for Entries, Exits, and then again for Providers.
When I switch the order of the subscripts like so:
Providers[age, province]
Entries[age, province]
Exits[age, province]
Provider Aging=shift if true(Providers[a22, Province], Time=integer(Time), ELMCOUNT(AGE), 0, Global Entry[a22, Province])
(which, as I understand it, should not work as I'd be trying to 'age' based on the rightmost subscript, province), the model runs without errors (except to warn me that 'Provider Aging' is not used in the model), which confuses me.
What am I missing?
Thanks.