← Back to team overview

dhis2-devs team mailing list archive

Re: 'Average' Aggregation does 'Sum' instead

 

Hi Rodolfo,

I am not sure if I understand you correctly so I will just try to explain
how it works: With avg operator, you can get a valid "disaggregated" data
value for period "within" the data collection frequency. So if you collect
population with a yearly frequency for a data element with the avg
operator, then you can also ask for the monthly value for a month in that
year. In that case, the values will be the same - sort of a "standing
value" for that period. If you have a value of e.g. 1000 people for the
year, then the value for the month will also be 1000. This is just the
nature of the data - if you have a population of 1000 for the year, then we
must assume that the population for a month is also 1000.

We do not allow "average within a period" or disaggregations for data
element which naturally sums across time. As an example, if you collect
cases of some disease at a quarterly frequency, we don't allow retrieving
the value for a month within that quarter simply using the average. The
reason is that it would not be valid statistics - we have no evidence that
not all cases happened in the last month of the quarter, etc.

regards,

Lars






On Mon, May 19, 2014 at 1:48 PM, Rodolfo Melia <rmelia@xxxxxxxxxxxx> wrote:

> Hi Lars - thanks for the quick reply.
>
> I though AVG was valid within the same data-collection period as well as
> across time. If this is the case, how do you calculate an average within
> the same data collection period? AN indicator that divides the DE that has
> the answer between valid answers? Normally that will be completed forms,
> but such variable is not available as a denominator. We will have to use a
> different Data Element that count valid answers. Last, such indicator will
> make sense within the same period, but not across periods, as it will give
> you an incorrect value, I think.
>
> Are you sure that AVG only makes sense across-time? Wouldn't be better to
> also use the same logic within the same period? What's the rationale? If
> there anyone out not wanting AVG to be calculated on the same data
> collection period as across periods?
>
> R
>
> *Rodolfo Meliá*
> *Principal  |  *rmelia@xxxxxxxxxxxx
> Skype: rod.melia  |  +44 777 576 4090  |  +1 708 872 7636
> www.knowming.com
>
>
> On Mon, May 19, 2014 at 12:05 PM, Lars Helge Øverland <larshelge@xxxxxxxxx
> > wrote:
>
>> Hi James,
>>
>> the "aggregation operator" refers to the time dimension - data will be
>> averaged through time but still summed in the org unit hierarchy dimension.
>> We could make this clearer in the system I guess.
>>
>> regards,
>>
>> Lars
>>
>>
>>
>> On Mon, May 19, 2014 at 12:55 PM, James Chang <jamesbchang@xxxxxxxxx>wrote:
>>
>>> Hi,
>>>
>>> On DHIS demo site, http://apps.dhis2.org/demo,
>>> 'Average' aggregation operator seem to do 'Sum' instead.
>>>
>>> I didn't do any data entry or ran Analytics, but only looking at the
>>> current data, 'Total Population' in 'Ngelehun CHC' and 'Njandama MCHP' seem
>>> to sum on 'Badjia' even though the 'Total Population' is set to 'Average'
>>> for Aggregation operator.
>>>
>>> See the attached images.
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

Follow ups

References