Announcement

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

  • cmp package problem - lcmp.mlib is read only

    Hello,

    I apologize in advance in case I say something really trivial. I am not a Stata user.

    I want to install package cmp

    After installing it and ghk2 and trying to run any simple regression with it, here is the error I get:
    Code:
    file c:\ado\plus/l/lcmp,mlib is read-only; cannot be modified or erased
    file is read-only; cannot be modified or erased
    I am using Stata 14 in a server without admin permissions and with no internet connection. Only a supervisor can install packages and so on.

    Can someone help debug this?

    The supervisor says that other people did not have any trouble in using other installed packages.




  • #2
    I have duplicated your problem by installing cmp and ghk2 then making lcmp.mlib read-only before the first time I try to use cmp. Stata needs to initialize the contents of lcmp.mlib the first time it is used, and the supervisor did not grant you write permission on that file.

    The supervisor should run the following simple example from an admin account that can modify the file. Once that is done, you should be able to use cmp successfully going forward. This program does not need internet connectivity to run.
    Code:
    clear all
    cmp setup
    sysuse auto
    reg mpg weight length
    cmp (mpg = weight length),  ind($cmp_cont) quietly
    and it produces this output when successful.
    Code:
    . clear all
    
    . cmp setup
    $cmp_out      = 0
    $cmp_missing  = .
    $cmp_cont     = 1
    $cmp_left     = 2
    $cmp_right    = 3
    $cmp_probit   = 4
    $cmp_oprobit  = 5
    $cmp_mprobit  = 6
    $cmp_int      = 7
    $cmp_trunc    = 8  (deprecated)
    $cmp_roprobit = 9
    $cmp_frac     = 10
    
    . sysuse auto
    (1978 Automobile Data)
    
    . reg mpg weight length
    
          Source |       SS           df       MS      Number of obs   =        74
    -------------+----------------------------------   F(2, 71)        =     69.34
           Model |  1616.08062         2  808.040312   Prob > F        =    0.0000
        Residual |  827.378835        71   11.653223   R-squared       =    0.6614
    -------------+----------------------------------   Adj R-squared   =    0.6519
           Total |  2443.45946        73  33.4720474   Root MSE        =    3.4137
    
    ------------------------------------------------------------------------------
             mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          weight |  -.0038515    .001586    -2.43   0.018    -.0070138   -.0006891
          length |  -.0795935   .0553577    -1.44   0.155    -.1899736    .0307867
           _cons |   47.88487    6.08787     7.87   0.000       35.746    60.02374
    ------------------------------------------------------------------------------
    
    . cmp (mpg = weight length),  ind($cmp_cont) quietly
    
    Fitting individual models as starting point for full model fit.
    
    Fitting constants-only model for LR test of overall model fit.
    
    Fitting full model.
    
    Mixed-process regression                        Number of obs     =         74
                                                    LR chi2(2)        =      80.14
    Log likelihood = -194.32676                     Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
             mpg |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    mpg          |
          weight |  -.0038515   .0015535    -2.48   0.013    -.0068963   -.0008067
          length |  -.0795935    .054224    -1.47   0.142    -.1858705    .0266836
           _cons |   47.88487    5.96319     8.03   0.000     36.19724    59.57251
    -------------+----------------------------------------------------------------
        /lnsig_1 |   1.207099   .0821995    14.68   0.000     1.045991    1.368207
    -------------+----------------------------------------------------------------
           sig_1 |   3.343769   .2748561                      2.846217    3.928299
    ------------------------------------------------------------------------------
    
    .
    Last edited by William Lisowski; 27 Jan 2021, 09:59.

    Comment


    • #3
      thank you! It worked

      Comment

      Working...
      X