Overview

Contents

This page was generated entirely from one Stata do-file. The narrative and static output come from webdoc2; the two interactive widgets below come from statashiny and are embedded with wdiframe.

Analysis

Summary statistics

Basic descriptives for the classic auto dataset:

. sysuse auto, clear
(1978 automobile data)

. summarize price mpg weight length

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
       price |         74    6165.257    2949.496       3291      15906
         mpg |         74     21.2973    5.785503         12         41
      weight |         74    3019.459    777.1936       1760       4840
      length |         74    187.9324    22.26634        142        233


Regression (collapsible)

Click to reveal the model. Price regressed on fuel economy, weight, and origin:

. sysuse auto, clear
(1978 automobile data)

. regress price mpg weight foreign

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(3, 70)        =     23.29
       Model |   317252881         3   105750960   Prob > F        =    0.0000
    Residual |   317812515        70  4540178.78   R-squared       =    0.4996
-------------+----------------------------------   Adj R-squared   =    0.4781
       Total |   635065396        73  8699525.97   Root MSE        =    2130.8

------------------------------------------------------------------------------
       price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         mpg |    21.8536   74.22114     0.29   0.769    -126.1758     169.883
      weight |   3.464706    .630749     5.49   0.000     2.206717    4.722695
     foreign |    3673.06   683.9783     5.37   0.000     2308.909    5037.212
       _cons |  -5853.696   3376.987    -1.73   0.087    -12588.88    881.4934
------------------------------------------------------------------------------



Interactive Table

The table below is fully searchable and sortable -- it is a live statashiny widget, not a static image. Type in the search box or click a column header.

Interactive Visualization

Move the sliders to change the simulated sample size and bin count. The Chart.js histogram redraws instantly in your browser.