inspect

Provides output for kernel.do_inspect()

source

get_inspect

 get_inspect (code='', cursor_pos=0, detail_level=0, omit_sections=())
launch_stata(splash=False)
run_sfi("""\
quietly set obs 5
quietly gen var1 = _n > 3
desc""")

Contains data
 Observations:             5                  
    Variables:             1                  
-------------------------------------------------------------------------------
Variable      Storage   Display    Value
    name         type    format    label      Variable label
-------------------------------------------------------------------------------
var1            float   %9.0g                 
-------------------------------------------------------------------------------
Sorted by: 
     Note: Dataset has changed since last saved.
print(get_inspect())
*** Last updated 13:09:56  4 Feb 2023 ***

Contains data
 Observations:             5                  
    Variables:             1                  
-------------------------------------------------------------------------------
Variable      Storage   Display    Value
    name         type    format    label      Variable label
-------------------------------------------------------------------------------
var1            float   %9.0g                 
-------------------------------------------------------------------------------
Sorted by: 
     Note: Dataset has changed since last saved.

*** Stored results:

scalars:
            r(changed) =  1
              r(width) =  4
                  r(k) =  1
                  r(N) =  5
run_sfi('quietly sum')
print(get_inspect())
*** Last updated 13:09:57  4 Feb 2023 ***

Contains data
 Observations:             5                  
    Variables:             1                  
-------------------------------------------------------------------------------
Variable      Storage   Display    Value
    name         type    format    label      Variable label
-------------------------------------------------------------------------------
var1            float   %9.0g                 
-------------------------------------------------------------------------------
Sorted by: 
     Note: Dataset has changed since last saved.

*** Stored results:

scalars:
                r(sum) =  2
                r(max) =  1
                r(min) =  0
                 r(sd) =  .5477225575051662
                r(Var) =  .3
               r(mean) =  .4
              r(sum_w) =  5
                  r(N) =  5
run_sfi('quietly reg var1')
print(get_inspect())
*** Last updated 13:09:58  4 Feb 2023 ***

Contains data
 Observations:             5                  
    Variables:             1                  
-------------------------------------------------------------------------------
Variable      Storage   Display    Value
    name         type    format    label      Variable label
-------------------------------------------------------------------------------
var1            float   %9.0g                 
-------------------------------------------------------------------------------
Sorted by: 
     Note: Dataset has changed since last saved.

*** Stored results:

matrices:
              r(table) :  9 x 1

scalars:
                  e(N) =  5
               e(df_m) =  0
               e(df_r) =  4
                  e(F) =  0
                 e(r2) =  0
               e(rmse) =  .5477225575051662
                e(mss) =  0
                e(rss) =  1.2
               e(r2_a) =  0
                 e(ll) =  -3.526901776922999
               e(ll_0) =  -3.526901776922999
               e(rank) =  1

macros:
            e(cmdline) : "regress var1"
              e(title) : "Linear regression"
          e(marginsok) : "XB default"
                e(vce) : "ols"
             e(depvar) : "var1"
                e(cmd) : "regress"
         e(properties) : "b V"
            e(predict) : "regres_p"
              e(model) : "ols"
          e(estat_cmd) : "regress_estat"

matrices:
                  e(b) :  1 x 1
                  e(V) :  1 x 1

functions:
             e(sample)   
run_sfi('clear all')
test_eq(get_inspect()[43:],"""\
Contains data
 Observations:             0                  
    Variables:             0                  
Sorted by: 
""")