Announcement

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

  • How do I store coefficients from GARCH model in a postfile

    Code:
    capture postutil clear
    postfile table1 arch using "vov.garch.dta", replace
    
    arch vov, arch(1) garch(1)
    post table1 (_b[arch]) (_b[garch])
    
    postclose table1
    Need help storing these coefficients into a new dta file. Line 4 is where the problem occurs.

    Thanks in advance!

  • #2
    Your postfile command includes only one variable name - arch - and your post command includes two parenthesized expressions. I think you want
    Code:
    postfile table1 arch garch using "vov.garch.dta", replace

    Comment


    • #3
      You're right. Simple typo in the original question.

      But the expression (_b[arch]) is not recognized. Under a simple OLS regression I would just use (_b[myvar]).
      But with the GARCH model, I don't know how to collect the coefficients. I've tried a number of different expressions with no luck.

      Any ideas?

      Comment


      • #4
        There's no need to try to guess the names of the coefficients. Most (all?) modeling commands support the coeflegend option. After your arch command to fit your model run
        Code:
        arch, coeflegend
        to have Stata replay the results without refitting the model, substituting in the coefficient names for the variable names.

        Comment


        • #5
          Thanks for your help. I was able to find the name for the expressions:

          Code:
           ([ARCH]_b[L.arch])
          and

          Code:
           ([ARCH]_b[L.garch])

          Comment

          Working...
          X