asdocx: Export from Stata to Word, Excel, LaTeX & HTML › Forums › asdocx Forum › Reg2 Template?
-
AuthorPosts
-
Hi Dr. Shah — I was reviewing recent updates to the master asdocx.ado file, and it looks like you’ve recently added support for a Reg2 template. Awesome! I’ve been playing around with it, and I’ve found that it only works part of the time. I thought it might be user error, so I went to look up additional details on how to implement it (and or modify it for my own template), and there isn’t any documentation on the website. In fact, I can’t find any additional details for a number of updates since 2022. Any help would be appreciated!
Thanks,
KevinHi Dr. Shah — just following up on this. Thanks!
Hi again Dr. Shah — any chance you might be able to provide some clarification?
Dear Kevin
Thanks for the follow up and the initial query. I have now added a page for reg2, visit it to get more details about the template.Hi Dr. Shah — thanks for this! I’m running into an error:
asdocx regress score i.asian, label template(reg2) replace save($Results/Regress.docx) Error: i.asian invalid name r(198);
So, I remove the factor notation and try this:
asdocx regress score asian, label template(reg2) replace save($Results/Regress.docx)
A new error:
variable previous_sheetname undeclared variable sheets undeclared masterclass_populator(): 3499 flexmat_to_excel() not found
: - function returned error [1] r(3499); Interestingly, this is the same error I received on the new thread I posted a few minutes ago. Any ideas?
Dear Kevin,
Thank you for your interest in the
reg2
template. Thereg2
template treats the first variable as the independent variable, followed by a list of dependent variables. This is indeed documented on thereg2
page.It’s also important to note that Stata does not allow factor variables in the dependent variable. This is a limitation of the software and not the template itself. The
reg2
template is designed to work within these constraints.I hope this clarifies your query. If you have any more questions or need further assistance, feel free to ask.
Thanks Dr. Shah. I understand now. I was thinking it the opposite — that there was one dependent, with multiple independent. So in your example on the help page, each of those ORs represents the odds of the corresponding variable occurring when Robotic==1?
In other words, the result of this Reg2 Template syntax:
asdocx logistic i.Robotic death cdarrest1, vce(cl new_ID) label template(reg2) replace
Is equivalent to the stacked result of this Stata syntax:
logistic death i.Robotic logistic cdarrest1 i.Robotic
Am I understanding correctly?
Thanks!
Yes, you understood it correctly.
Hi Dr. Shah — I’m loving this template. I wonder, how would I change the decimal placement for ORs, but leave the P-Value decimal place?
For example, I want to report out 2 decimal places for ORs (e.g. 2.06), but leave 3 decimal places for the P-Value (e.g. 0.003)
Thanks!
Hi Dr. Shah — just following up on this!
Thanks,
Kevin -
AuthorPosts
- You must be logged in to reply to this topic.