Forum Replies Created
-
AuthorPosts
-
in reply to: Value labels diassapear when using the sort option #16126
Also, labels are not correct when using the
bysort
option withsum
.I have some summated statistics I want to show, sorted on schools:
asdocx bysort school_id: sum VARLIST if school_id~=999, detail stat(count mean sd var cv p50 skewness) title() dec(2) tzok c2_dec(0) c7_dec(0)
and the resulting value labels for each group is not correct. Can you take a look at this?Thank you for reading this post!
in reply to: Tabulate without reporting row/column percent #16124I have found this community contributed command
ssc desc fre
Which allows what I am looking for, when using the codefre var, all include(1 2 3 4) novalue nomissing
. Looks like this:Freq. Percent Cum. Slet ikke 0 0.00 0.00 I lav grad 0 0.00 0.00 Hverken/eller 1 6.25 6.25 I nogen grad 2 12.50 18.75 I høj grad 13 81.25 100.00 Total 16 100.00
Maybe this could be supported by asdocx? Either by supporting this command or extending the capabilities of asdocx with the regular
tab
command?
I now it might sounds odd wanting to report empty categories, since they do not exist in a statistical sense.
But I use these command for making descriptive statistics reports were people who don’t know a first thing about statistics has to read frequency tables, and they always ask “why is the scale different in this item?” which is really annoying. Therfore, i prefer just to include empty categories to make it transparent.Thank you for reading this post!
in reply to: Tabulate without reporting row/column percent #16123Here I have another one related to the tabulate command:
Is it possible to export statistics using
asdocx tab var, title()
and still show empty categories, but without treating missing values as values when calculating percentages. This is, if a particular response category has zero observations, is shown as 0 frequency, zero percentage and the appropriate cumulative percentage according to its place in the table… But missing values are still now shown as normal.in reply to: Tabulate without reporting row/column percent #15992This is really useful and I actually need something like this now.
This approach only seem work if using the replace option, but I am creating a report of descriptive statistics by using collect mode so I need to run the code and only append the final table in the report.
I use the following code;
asdocx tab skoleid s_3 if skoleid ~=11, rowsort
which gives me:
Tabulation of skoleid s_3 0 |1 2 3 4 ----+----------------------------------------------------------------------------- 1 | skoleid s_3 ----+----------------------------------------------------------------------------- 2 | 1 Nej Ja Total 3 |Tåsingeskolen 77 51 128 4 | 60.156 39.844 100 5 |Thurø Skole 62 25 87 6 | 71.264 28.736 100 7 |Stokkebækskolen 38 36 74 8 | 51.351 48.649 100 9 |Issø-skolen 34 25 59 10 | 57.627 42.373 100 11 |Tved Skole 31 27 58 12 | 53.448 46.552 100 13 |Skårup Skole 28 26 54 14 | 51.852 48.148 100 15 |Rantzausminde Skole 30 14 44 16 | 68.182 31.818 100 17 | Total 300 204 504 18 | 59.524 40.476 100 ----------------------------------------------------------------------------------
and then
flexmat droprow, row(3,5,7,9,11,13,15)
which gives me:Tabulation of skoleid s_3 0 |1 2 3 4 ----+------------------------------------------------------------------------------------------------------------- 1 |\vline skoleid \qc \hmerge_3 s_3 ----+------------------------------------------------------------------------------------------------------------- 2 |\rowheader \vmerge_1 Nej Ja \hline Total 3 | 60.156 39.844 100 4 | 71.264 28.736 100 5 | 51.351 48.649 100 6 | 57.627 42.373 100 7 | 53.448 46.552 100 8 | 51.852 48.148 100 9 | 68.182 31.818 100 10 |\hline Total 300 204 504 11 | 59.524 40.476 100 ------------------------------------------------------------------------------------------------------------------
The value labels of
skoleid
in column 1 disappears because these are situated in the the rows that I am dropping with flexmat. Some way to resolve this?I would also like to give names to the column header. I would like to add the total N of each category of variable
skoleid
before column 2.
In the final table I would like to name column 1 “skole”, column 2 “N”, column 3 “Nej”, column 4 “Ja”, and column 5 “Total”.If you can help this would be great! Thank you so much.
in reply to: Value labels diassapear when using the sort option #15975Thank you so much for the update!
in reply to: Table size and table layout in adocx #15974Thank you so much for the update.
I will most definetely recommend the use of asdocx for other researchers using stata, since i find it very useful and versatile.
in reply to: Table size and table layout in adocx #15969just ignore the first questions in this post.
I have another question instead:
does the settingglobal header_row_fontbold 1
in the asdocx_defaults.ado not supposed to bold the text in the header row that can also be shaded with
global header_row_background FFFFFF } else global header_row_background DCDCDC
?If yes, then it is not working for me. Do you now why this is so?
in reply to: “asdocx collect on” command doesn’t work #15968Thank you so much!
Great!
in reply to: Table size and table layout in adocx #15967Thank you so much. ! This is a great update
I have to new questions/suggestions about formatting tables:
1. Is it possible to format the last line showing “total” in a contingency table to bold and with a visible black line at the very bottom of this cell? ( I like to write notes about the tables under the table, but seperated by such a line)
2. is it possible to allow for the table title to be formatted in heading1 heading2 etc…?
By the way, thank you for great support. You have already replied to several of my posts and thus confirmed my choice of paying for using the ado, even thou this is something that I don’t do often. But its nice with the possibility of support and help once in a while regarding the use of the program, since is so versatile. THANK you!
in reply to: “asdocx collect on” command doesn’t work #15962Thank you so much for a quick reply.
Now the command return the following error:
masterclass::flexmat_to_docx(): 3499 _docx_cell_set_border() not found
masterclass_populator(): – function returned error
<istmt>: – function returned errorWhat does this mean?
Also i should add that all value labels are correct when only executing this command on one variable like:
asdocx sum s_13, detail stat(count mean sd var cv p50 skewness) title(something in danish) font(arial) dec(2) replace save(test2.docx) tzok
in reply to: Adding column to table #15874Thank you Dr. Shah!
-
AuthorPosts