Announcement

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

  • drawing sample of coefficients from a vce or correlation matrix

    Hi everyone,
    I have a vce matrix as well as its corresponding correlation matrix which I obtained after running a biprobit model. Using the bootstrap method, I am trying to draw 1000 sample of coefficients from either vce or correlation matrices and save them for further analyses. Is there any way to do so?
    Best,
    Nader

  • #2
    It's not clear what you're up to, but that matrix isn't of coefficients.

    Comment


    • #3
      Using bootstrap, I am pretty sure that sample of coefficients can be drawn from vce. Following is part of R codes that draws 2000 sample of coefficients from vce as well as mean matrices obtained from a biprobit model and save them. I wonder if Stata can do same.
      #generate bootstrap/simulated samples and write to file

      for(i in 1:2000){ u=as.matrix(rnorm(4,0,1)) v=as.matrix(rnorm(4,0,1))
      bh=mnh + t(chol(hv))%*%u bm=mnm + t(chol(mv))%*%v
      write(c(i,0,bh[4],bh[1],bh[2],bh[3],bm[4],bm[1],bm[2],bm[3]), file="c:\\bs_no.par", ncol=10,append=T) }
      Last edited by Mahdie Raj; 09 Dec 2018, 19:55.

      Comment


      • #4
        I think the confusion is due to the fact that what you describe is not what would traditionally be called a bootstrap. It could be a simulation, and under some very specific circumstances you might get away with calling it parametric bootstrap.

        Stata can draw from a multivariate normal distribution, see help drawnorm
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          The only context of which I can think, where the exercise of drawing samples from the estimated coefficients distribution makes sense, is if you are trying to find the distribution of some awkward statistic such as the maximum of the estimated parameters. Otherwise this is a "very parametric" exercise which does not improve in any sense on just using asymptotic theory, because you are assuming that the variance matrix is correctly estimated and that the parameters are jointly normal in this exercise, i.e., you are effectively assuming that asymptotic theory is correct.

          If you are still insisting on doing this, as Maarten said -drawnorm- is the way to go.

          Comment


          • #6
            Thank you so much for the clarification.
            In my study, the vce matrix is obtained from biprobit model in which the outcome variables are assumed to be correlated. Can I use “drawnorm” in this case?

            Comment


            • #7
              What exactly are you hoping to achieve? Technically you can use drawnorm, and it will do what it is supposed to do, but I suspect it does not do what you hope it can do (either in Stata, or the equivalent functions in R, or Some Alternative Software).
              ---------------------------------
              Maarten L. Buis
              University of Konstanz
              Department of history and sociology
              box 40
              78457 Konstanz
              Germany
              http://www.maartenbuis.nl
              ---------------------------------

              Comment


              • #8
                I am trying to draw 1000 hazard coefficients from a vce matrix which I obtained from a biprobit model. I would like to use the coefficients for further analyses such as computing the probability of transitions.

                Comment


                • #9
                  Again, why? Are you trying to do some form of inference using these draws? At the very least, this is not a bootstrap. Why not use simpler methods like the delta method? We need all those details in order to help you, as with programming the devil is in the details.
                  ---------------------------------
                  Maarten L. Buis
                  University of Konstanz
                  Department of history and sociology
                  box 40
                  78457 Konstanz
                  Germany
                  http://www.maartenbuis.nl
                  ---------------------------------

                  Comment

                  Working...
                  X