Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Making program's standard error results available available for _se[var] call?

    Hi everyone,

    So I'm working on extracting output from a user generated program (traj). I can get the B coefficients to post as vector matrix e(b) without any trouble. This means I type something like:

    local test=[eq1]_b[varname]

    and it will return the regression coefficient.

    How do I get stata to post the SE values (a 1 x 60 matrix) as a similar vector matrix that I can call then in the same fashion (local test=[eq1]_se[varname] )? Stata's programs do this but I can't figure out how to do for my own program. I see that the SEs are stored in r(table), but I can't figure out how to get stata to post results to that table and recognize _se.

    The complication here that the SEs have to be entered manually- the B's are returned by the original program but not the SEs, and the program is run through a C plugin that is beyond my skill to even open at the moment.

    This summarizes the situation I'm dealing with and my end goal:

    program quicktest, eclass
    regress price mpg headroom
    tempvar b se
    matrix define `b'=e(b)
    *SE values from above regression must be entered manually in my case*
    matrix define `se'=(58.42, 399.549, 2074.497)
    ereturn post `b'
    end

    (the end goal is just):
    di _b[mpg]/_se[mpg]

    Thank you!

  • #2
    No mention of Mata here. Please repost in General.

    Comment


    • #3
      You're right, my mistake.

      Comment

      Working...
      X