Germán Rodríguez
Stata Markdown Princeton University

Bundled Images

This is exactly the same script as Simple Script, but after generating HTML we run the command bundle using simpleScript to produce simpleScript-b.html. If you choose view source in your browser you will see that the image is now bundled in.

simpleScript-b.html

Let us read the fuel efficiency data that is shipped with Stata

. sysuse auto, clear
(1978 Automobile Data)

To study how fuel efficiency depends on weight it is useful to transform the dependent variable from "miles per gallon" to "gallons per 100 miles"

. gen gphm = 100/mpg

We then obtain a more linear relationship

. twoway scatter gphm weight || lfit gphm weight ///
>     , ytitle(Gallons per Mile) legend(off)

. graph export auto.png, width(500) replace
(file auto.png written in PNG format)
Fuel Efficiency

Fuel Efficiency

That's all for now!