Working with in
You can work with a Jupyter
notebook using Stata
just as you would using Python. Text and math can be written in Markdown as we have done in the other notebooks. So, use your usual Stata
code in code cells
, produce figures etc., as if you were in the Stata
console, but make it nice by using markdown to explain what you are doing.
A simple example¶
Let's run a simple Stata
example using one of their help files.
In [1]:
sysuse auto.dta
Basic information¶
Let's summarize and describe the data.
In [3]:
summ
In [4]:
desc
Regressions¶
Let's run a simple regression
In [8]:
reg price mpg rep78 headroom trunk weight length turn displacement gear_ratio foreign, r
Plots¶
In [9]:
scatter price mpg, mlabel(make)
In [ ]: