Previous PageNext Page

Storing Data When Storing Summaries Will Suffice

In the data set above, there are 10,000 observations with 100 unique value combinations of the variables X1-X100. Each combination appears in the data set 100 times. You can store one record in the data set for each combination of variables. Use a new variable, such as count, to hold the number of observations each record refers to.

Example:

data bigone;
	drop j k;
	array XX {*} X1-X100;
	count=100;
	do j=1 to 100;
		do k=1 to dim(XX);
			XX(k)=k + 1000*j;
			end;
		output;
		end;
run;

proc means data=bigone;
	freq count;
run;

Proc Means produces the same output here as before. The key is "freq count;" that effectively (though not literally) expands the data to its original form for use in Proc Means.

Previous PageTable Of ContentsNext Page