Announcement

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

  • Increase the amount of memory allocated

    Hello,

    I am trying to estimate a mvtobit (3 equations related with time use), with:
    1-Memory: it is weird I have run this model early and Stata showed results, but now it is impossible, simply the program stop and the pc as well, it looks Stata is using all memory of my pc, but why is happening until this moment? What can I do?

    2- If I put less memory or less draws Stata don't get results, this shows error r(901). I am working with a data that contain 15,500 observations, with 26 variables it is not a big data, then I tried opening the data only the variables below and this didn't work as well, I cannot understand it.

    2-This is my model and I got results early using this sequence

    version 11
    clear
    set virtual on
    set mem 20000m

    xi: mvtobit (h1= i.relation gender i.age_group i.edu_level eth hsize gender_hh depe_rate fam_coh dom_wk ) ///
    (h2= i.relation i.age_group i.edu_level eth hsize gender_hh depe_rate fam_coh dom_wk) ///
    (h3= i.relation gender i.age_group i.edu_level eth hsize gender_hh depe_rate fam_coh dom_wk) [aw=FACTOR], dr(1440)an


    Thanks for your attention,







  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    I'm not sure about memory in Stata 11. Have you tried rebooting your computer? Mvtobit is user written so unless someone happens to have familiarity with the program, you're less likely to get assistance and more likely to have bugs than a Stata provided routine. . Have you checked cmp? It might work when mvtobit doesn't (as the documentation says). Later Stata versions handle memory for you. gsem in Stata 15 would also be an option. Note also, it doesn't look like you've got endogeneity so equation by equation estimation would be consistent.

    It is likely you've inadvertently changed something, but what I couldn't begin to guess.

    Comment


    • #3
      Thanks Phill,

      It is so weird because Stata provided me results using the same code.
      [version 11
      clear
      set virtual on
      set mem 20000m ][

      [
      . xi: mvtobit (hw1= i.relation_head gender i.age_group i.edu_level eth)(hw2= i
      > .relation_head gender i.age_group i.edu_level eth) ///
      > (paid_work= i.relation_head gender i.age_group i.edu_level eth) if gender==
      > 1 [aw=FACTOR], dr(1440)an
      i.relation_head _Irelation__1-5 (naturally coded; _Irelation__1 omitted)
      i.age_group _Iage_group_1-4 (naturally coded; _Iage_group_1 omitted)
      i.edu_level _Iedu_level_1-5 (naturally coded; _Iedu_level_1 omitted)

      ][Multivariate Tobit/mixed model Number of obs = 3555
      Wald chi2(36) = 668.94
      Log likelihood = -22748.23 Prob > chi2 = 0.0000

      ------------------------------------------------------------------------------
      | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      hw1 |
      _Irelation~2 | .8523257 .1422926 5.99 0.000 .5734374 1.131214
      _Irelation~3 | -1.06576 .1780778 -5.98 0.000 -1.414786 -.716734
      _Irelation~4 | -.1494965 .4319741 -0.35 0.729 -.9961502 .6971573
      _Irelation~5 | -.9621444 .2504322 -3.84 0.000 -1.452982 -.4713063
      _Iage_grou~2 | .0297264 .155426 0.19 0.848 -.2749029 .3343558
      _Iage_grou~3 | .3430157 .180678 1.90 0.058 -.0111066 .697138
      _Iage_grou~4 | .1735992 .2511143 0.69 0.489 -.3185758 .6657742
      _Iedu_leve~2 | .1377685 .1697148 0.81 0.417 -.1948664 .4704034
      _Iedu_leve~3 | -.2135893 .1801334 -1.19 0.236 -.5666443 .1394657
      _Iedu_leve~4 | -.9980038 .2358589 -4.23 0.000 -1.460279 -.5357288
      _Iedu_leve~5 | -1.171149 .7166145 -1.63 0.102 -2.575688 .2333898
      eth | .1933817 .1301095 1.49 0.137 -.0616283 .4483917
      _cons | 1.926383 .2471069 7.80 0.000 1.442062 2.410703
      /]

      But, I am using the same code and it does not works Stata says I need drops variables, I mean more memory for both case I used 20000m [xi: mvtobit (hw1= i.relation_head gender i.age_group i.edu_level eth)(hw2= i.relation_head gender i.age_group i.edu_level eth) ///
      (paid_work= i.relation_head gender i.age_group i.edu_level eth) if gender==1 [aw=FACTOR], dr(1440)an
      ]





      Comment

      Working...
      X