Is there a way to access the values generated by the 'table' command and store it as a scalar for use in calculations.
For instance I want to use the means generated by this two-way table command which generates the mean of a third value (ie, apple_price):
A way to do this by creating a new variable is by calling:
..but then again, this requires creating a new variable.
For instance I want to use the means generated by this two-way table command which generates the mean of a third value (ie, apple_price):
Code:
table country state, c(mean apple_price n apple_price) format(%14.2fc)
Code:
bysort country state: egen groupmean_price= mean(apple_price)
Comment