Hi all,
I am facing two issues with the iebaltab (part of ietoolkit) command from SSC. Before anything, here is an example of my data:
I am trying to create a balance table for various variables based on union status (the variable "union" in the data) for each year (1978 and 1985). The first issue I am facing is the onerow option - this is used for printing the number of observations in one row at the bottom of the table instead of creating a separate column which repeats the N in every row. According to the help file, the onerow option should work if all rows in a particular column have the same N, which in my case is true. However, I still get an error from Stata saying "rowsof not allowed". I am not sure why this is the case. The command I am using is:
If I do this without onerow it works, but then my table looks like the following image. As you can see, all the Ns are the same within a column, so I see no reason why onerow should not work.

The second issue I am facing is with the tex options of iebaltab. The texdocument option creates a standalone tex document (which has begin(document) and end(document) contained within it), so if I just try to upload it and use \input within my main tex file, it does compile but shows up an error, and gives me the extra text you see at the top of the image above (the "article8, adjustbox, maxwidth", etc).
On the other hand, if I don't use texdocument, which gives me a tex file with just a table environment that can be inputted, I can not specify a caption for the table (as the texcaption option can only be used with the texdocument option). Thus, without using texdocument and texcaption I get a table like the one below (without a title for the table). I guess what I am looking for is an option like "title" in esttab. I am sorry, I guess this became more of a latex question.

I am facing two issues with the iebaltab (part of ietoolkit) command from SSC. Before anything, here is an example of my data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(lnwage fe nonwh hisp ed ex exsq year union) 2.1972 0 0 0 10 27 729 1985 0 1.7047 0 0 0 12 20 400 1985 0 1.335 1 0 0 12 4 16 1985 0 2.3514 1 0 0 12 29 841 1985 0 2.708 0 0 0 12 40 1600 1985 1 2.1972 1 0 0 16 27 729 1985 0 2.2586 1 0 0 12 5 25 1985 1 2.708 0 0 0 14 22 484 1985 0 2.3979 0 0 0 8 42 1764 1985 0 1.6094 1 0 0 12 14 196 1985 0 3.2179 0 0 1 17 18 324 1985 0 3.0155 0 0 0 17 3 9 1985 0 3.2189 0 0 1 14 4 16 1985 1 2.6376 0 0 0 14 14 196 1985 0 1.2528 0 0 0 12 35 1225 1985 0 1.6094 0 0 1 14 0 0 1985 0 2.3026 0 0 1 16 7 49 1985 1 2.708 0 1 0 16 26 676 1985 1 1.763 0 1 0 13 3 9 1985 0 2.2083 0 0 1 13 16 256 1985 0 2.4204 1 1 0 17 32 1024 1985 0 2.5649 0 1 0 12 25 625 1985 1 2.0794 1 0 0 14 15 225 1985 1 1.454 1 0 0 12 38 1444 1985 0 2.0637 0 1 0 16 17 289 1985 0 1.9379 1 0 0 12 7 49 1985 0 3.2179 1 0 0 17 5 25 1985 0 2.3026 0 0 0 14 22 484 1985 0 2.621 0 0 0 14 21 441 1985 0 1.7272 1 0 1 13 2 4 1985 0 2.6858 0 1 0 14 16 256 1985 0 3.2179 0 0 0 16 18 324 1985 0 2.4849 0 0 0 12 14 196 1985 0 2.708 0 0 0 18 12 144 1985 0 1.7535 0 0 0 16 3 9 1985 0 2.5377 1 0 0 17 13 169 1985 0 2.4605 1 0 0 16 42 1764 1985 0 2.5649 0 0 0 12 8 64 1985 0 2.5257 1 0 0 15 6 36 1985 0 3.1135 0 0 0 16 22 484 1985 0 2.4204 1 1 0 16 3 9 1985 0 2.7331 0 0 0 16 33 1089 1985 0 2.0412 1 0 0 13 8 64 1985 1 2.4715 0 0 0 12 26 676 1985 0 1.6094 0 0 0 14 0 0 1985 0 1.8718 0 0 0 12 28 784 1985 0 2.1972 0 0 0 8 33 1089 1985 1 1.209 0 0 0 12 0 0 1985 0 1.5041 1 0 0 12 7 49 1985 0 2.3539 1 0 0 14 12 144 1985 0 end
I am trying to create a balance table for various variables based on union status (the variable "union" in the data) for each year (1978 and 1985). The first issue I am facing is the onerow option - this is used for printing the number of observations in one row at the bottom of the table instead of creating a separate column which repeats the N in every row. According to the help file, the onerow option should work if all rows in a particular column have the same N, which in my case is true. However, I still get an error from Stata saying "rowsof not allowed". I am not sure why this is the case. The command I am using is:
Code:
iebaltab lnwage fe nonwh hisp ed ex exsq if year == 1978, grpvar(union) /// savetex("$output/ps3q2t2.tex") rowvarlabels replace /// vce(robust) nonote grouplabels ("0 Non-unionized @ 1 Unionized") /// texdocument texcaption("Demographics by union status")
The second issue I am facing is with the tex options of iebaltab. The texdocument option creates a standalone tex document (which has begin(document) and end(document) contained within it), so if I just try to upload it and use \input within my main tex file, it does compile but shows up an error, and gives me the extra text you see at the top of the image above (the "article8, adjustbox, maxwidth", etc).
On the other hand, if I don't use texdocument, which gives me a tex file with just a table environment that can be inputted, I can not specify a caption for the table (as the texcaption option can only be used with the texdocument option). Thus, without using texdocument and texcaption I get a table like the one below (without a title for the table). I guess what I am looking for is an option like "title" in esttab. I am sorry, I guess this became more of a latex question.