Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Trouble constructing a table...


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Trouble constructing a table...
Date   Sun, 28 Jan 2007 17:41:22 -0000

You must first calculate the means and standard deviations
you want. I don't see that this email gives any clue
on how you to want to calculate them with respect to either
cohort or type, but -egen- may help. Once that is done, 
this looks more like a -list- problem that a tabulation problem to me. 

Nick 
[email protected] 

MA V

> I am trying to construct a table but I wonder if I have to change the 
> arrangement of my dataset in order to get the desired table...
> 
> This is a sample of the data:
> cohort; type; variable; true; estimated
> 1 A 1 0.5 0.55
> 1 B 1 0.7 0.76
> 1 A 2 0.2 0.23
> 1 B 2 0.1 0.11
> 2 A 1 0.5 0.52
> 2 B 1 0.7 0.74
> 2 A 2 0.2 0.26
> 2 B 2 0.1 0.13
> 
> (cohort, type and variable are all categorical variables)
> 
> I am trying to construct a table with the following configuration:
> rows (2 rows): type (A,B) [in the complete dataset I have 15 cohorts: 
> A,B,C,D,...]
> columns (6 columns): True_variable1, True_variable2, 
> Estimated_variable1(mean), Estimated_variable2(sd), 
> Estimated_variable2(mean), Estimated_variable2(sd)
> 
> I tried using tabstat and tablemat but none of these options seems to 
> provide what I need.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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