Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: listing variable values

From   Ida Johnsson <>
Subject   st: listing variable values
Date   Sat, 31 Jul 2010 18:42:52 +0200

I have the following problem. I have a variables for different industries in long form (industry variable NACE and time variable year) and would like to create a latex table in which the columns would be values for selected variables for selected years, for example:
Column 1	Column 2			Column 3
Industry		Turnover Year 1 		Turnover Year 10
	10			1					2
	11			3					5
	12			4					4


My idea was to create a matrixes with variables values in the columns

mkmat nace Turnover if year==1, matrix(X)

mkmat Turnover if year==10, matrix(Y)

matrix Z=X,Y

and then export them to latex using estout, esttab or outtable. However, when I tried

outtable using "/Users/ida/Desktop/table1",mat(Z) replace label norowlab caption("Turnover")

I got the message "variable r2 not found". The variable Industry has labels, which I would like to be displayed instead of the numerical values, and I'd also like to suppres the row names of the matrix (r1, r2 ... ). I have the feeling that creating a matrix to export variable values to latex is a somewhat roundabout way. Is it possible to use listtex to list values of the same variable but for different years in separate columns?

I will be vary grateful for all help.

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index