Forum Replies Created
-
AuthorPosts
-
Fantastic. Thanks so much for the detailed and quick reply!
– Kevin
This works! THANK YOU SO MUCH!
Hello! Just following up on this. Thanks!
Just to keep things as simple as possible, the same thing happens on the BPWide example dataset (no frequencies):
clear all sysuse bpwide (Fictional blood-pressure data) cd "/Users/Default/Downloads" /Users/Default/Downloads asdocx tab sex agegrp, row save(test) replace +----------------+ | Key | |----------------| | frequency | | row percentage | +----------------+ | Age group Sex | 30-45 46-59 60+ | Total -----------+---------------------------------+---------- Male | 20 20 20 | 60 | 33.33 33.33 33.33 | 100.00 -----------+---------------------------------+---------- Female | 20 20 20 | 60 | 33.33 33.33 33.33 | 100.00 -----------+---------------------------------+---------- Total | 40 40 40 | 120 | 33.33 33.33 33.33 | 100.00 - mata: write_full_matrix("`matname'", "`file'", `loc') = mata: write_full_matrix("/Users/Default/Downloads/_asdoc/current_file.asdoc", "/Users/Default/Downloads/_asdoc/test.flexmat", 1) - set trace off Tabulation of sex agegrp 0 |1 2 3 4 5 ----+------------------------------------------------------------------------------ 1 | Sex Age group 2 | 30-45 46-59 60+ Total ----+------------------------------------------------------------------------------ 3 |Male 33.333 33.333 33.333 100 4 | 5 |Female 33.333 33.333 33.333 100 6 | 7 |Total 33.333 33.333 33.333 100 8 | ----------------------------------------------------------------------------------- Notes: Click to Open File: /Users/Default/Downloads/test.docx
Can you replicate the issue?
Hi again — I’m still running into issues, even without the matcell() option invoked: only percents show up, not frequencies:
asdocx tab pre_ice flu, row save($Results/test) replace nokey Tabulation of pre_ice flu 0 |1 2 3 4 ----+----------------------------------------------------------------------------------------- 1 | Learning Era of ICE Fluoroscopy Needed? 2 | No Yes Total ----+----------------------------------------------------------------------------------------- 3 |No 23.913 76.087 100 4 | 5 |Yes 6.667 93.333 100 6 | 7 |Total 19.672 80.328 100 8 | ---------------------------------------------------------------------------------------------- Notes: Click to Open File: /XXX
What am I doing wrong?
That makes total sense. Thanks for the quick reply!
in reply to: Output to Multiple Documents Simultaneously? #17380There it is — that’s what I was looking for, on both counts! THANK YOU!
in reply to: Output to Multiple Documents Simultaneously? #17375Also, because I have a feeling I’ll be using this forum regularly, what is the markdown syntax for code blocks here?
in reply to: “Tab” Conformability Error #17367Sorry about the formatting of the above post. Not sure how to fix it — the “Edit” option is no longer available or else I’d make it easier to read!
in reply to: “Tab” Conformability Error #17366Thank you! I’ve also discovered another bug, though it might be a feature.
I’m looping over variables to create a “First Look” document, where each variable has its basic information included above its simple TAB. My code is in the following loop:
asdocx collect on asdocx, text(This is the beginning of the document.) save("First Look") replace foreach var of varlist * { collect: asdocx describe
var’, det
collect: asdocx tabvar', lab dec(1) tzoc title("VARIABLE:
var'”) mi
}
asdocx export
asdocx collect off
`
However, there’s an error on the “describe” command; the “detail” option is not allowed. When the “detail” option is removed, asdocx treats the “describe” command as if being applied to all variables. It seems to ignore the [variable] specifier in the original “describe” command.I’ve tried to find a way around this issue by looking for some sort of community-contributed program that stores variable descriptives (type, etc) in a macro, but I can’t find anything. Is this something to be fixed or is this how it is intended to function?
Thanks!
in reply to: “Tab” Conformability Error #17348One more thing: I’m trying to do an XLSX export, as well as a DOCX export: the DOCX works fine, but I’m getting the following error for XLSX:
COMMAND:
asdocx list studyid, save(test.xlsx)
RESULT:
invalid column range: starting column 1 is after ending column 0
Happy to provide a more detailed output if you like.
Thanks so much,
Kevinin reply to: “Tab” Conformability Error #17347Fantastic. Thank you!
in reply to: “Tab” Conformability Error #17337Hi Dr. Shah — I’ve confirmed that the “no observations” scenario is the issue.
CODE:
. sys use auto . tab make foreign if make=="Subaru" | Car origin Make and model | Foreign | Total -------------------+-----------+---------- Subaru | 1 | 1 -------------------+-----------+---------- Total | 1 | 1 . tab make foreign if make=="Subaru" & foreign==0 no observations . asdocx tab make foreign if make=="Subaru" & foreign==0 no observations asdocx_tab_twovars(): 3200 conformability error - function returned error r(3200);
Is this something you’d be able to tweak in the program code to allow for?
-
AuthorPosts