Announcement

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

  • Error with testparm after saving/using estimation results

    Hi,
    I am getting an error when trying -testparm- after saving and then reloading (using) estimation results from an mlogit model.
    The equivalent test with -test- works.
    I am not sure if it is a bug or something I need to specify differently with testparm for reloaded estimates. The problem seems to be related to the equation option in testparm.


    Version 18, updated 30 Apr 2024. (I am not admin and cannot update to latest -- perhaps this was fixed -- is there a way to find the -whatsnew- lists outside of Stata?)
    Thanks,
    Scott


    Code:
    clear all
    set obs 1000
    set seed 99
    gen y = runiformint(1,4)
    gen x1=runiformint(1,4)
    gen x2=runiformint(1,4)
    
    mlogit y ib1.x1##ib1.x2, base(1)
    testparm 3.x1#i.x2, equation(2) //works
    
    est store m1
    est restore m1
    testparm 3.x1#i.x2, equation(2) //usually works
    
    est save "m1", replace
    est clear
    
    est use "m1"
    testparm 3.x1#i.x2 //works although not interesting since base equation
    testparm 3.x1#i.x2, equation(1) //error
    testparm 3.x1#i.x2, equation(2) //error "no such variables" altho clearly listed in e(b)
    
    //same test - not see errors so far
    test ///
     (   [2]3.x1#2.x2 = 0 ) ///
     (   [2]3.x1#3.x2 = 0 ) ///
     (   [2]3.x1#4.x2 = 0 )

  • #2
    the testpart equation(1) doesn't work even after the mlogit model.

    but i don't use this save approach, so don't know why it doesn't work.
    Last edited by George Ford; 20 Aug 2024, 17:31.

    Comment

    Working...
    X