Program
Program

Reputation: 65

Why does aggregate divide a dataset into sub-groups?

I have dataset1 with two variables:

Date   Date
Type   Numeric   //Can be either 1 or 2

It looks like this (simplified):

Date      Type
04.04.15  1
04.04.15  1
04.04.15  1
04.04.15  1
04.04.15  1
04.04.15  1
04.04.15  1
04.04.15  1

When I try to aggregate this into a new dataset, I get:

04.04.15  6
04.04.15  2

Why does it divide into two subgroups? I have tried changing the datatype, but it still does the same. Why does it not simply aggregate it to 8?

I use the aggregate data command, with date as the break variable, and I check the count variables tick-box.

Upvotes: 2

Views: 52

Answers (1)

eli-k
eli-k

Reputation: 11310

Date variables can contain time in addition to date, but be formatted to show only the date in the file. Your two groups must have the same dates but different times. Try going to the variable view and changing the Date format to one that shows the time, then you'll see if this is indeed the explanation.

Upvotes: 1

Related Questions