Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Kevin Blaine
    Participant
    Post count: 51

    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,
    Kevin

    Kevin Blaine
    Participant
    Post count: 51

    Hi Dr. Shah — just following up on this. Thanks!

    Kevin Blaine
    Participant
    Post count: 51

    Hi again Dr. Shah — any chance you might be able to provide some clarification?

    Attaullah Shah
    Moderator
    Post count: 76

    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.

    Kevin Blaine
    Participant
    Post count: 51

    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?

    Attaullah Shah
    Moderator
    Post count: 76

    Dear Kevin,

    Thank you for your interest in the reg2 template. The reg2 template treats the first variable as the independent variable, followed by a list of dependent variables. This is indeed documented on the reg2 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.

    Kevin Blaine
    Participant
    Post count: 51

    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!

    Attaullah Shah
    Moderator
    Post count: 76

    Yes, you understood it correctly.

    Kevin Blaine
    Participant
    Post count: 51

    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!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.