Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: tabstatmat repeatedly

From   "Camelia Minoiu" <>
To   <>
Subject   st: Re: tabstatmat repeatedly
Date   Sun, 26 Sep 2004 20:25:12 -0400

Thank you very much for your help. I have studied all responses carefully. I
should have mentioned that each variable in the list v1 to v100 has a
variable called "category_v*" in the dataset. The variables category_v1 to
category_v100 contain a breakout of the values of each v variable into five
categories (1 to 5). I then want to obtain summary statistics (one at a
time, indeed --  I initially thought that I could have 2 summary statistics
and then the matrix with results for the 2nd would be appended to the matrix
for the 1st summary statistic) from the cells in the v's by the
category_v's.  Unfortunately, I still don't know how to do it in Stata.

In other words, I have the dataset:

v1        v2        category_v1        category_v2

x11    x21        1                            2
x12    x22        1                            2
x13    x23        2                            1
x14    x24        2                            1

I would like to obtain a matrix which gives me the mean of x11 and x12 in
the first cell, and then the mean of x23 and x24 in the second cell (by
category 1). The same for category 2 correspoding x's, whose means should be
put in the second row of the matrix.  Would this be possible?

Thank you very much.

Camelia Minoiu
PhD Student
Department of Economics, Columbia University

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index