 So I've gone over a few tools for data manipulation at the command line now I wanted to challenge myself a little bit and look for some command line utilities for modeling and There's not that many command line utilities for modeling, but there is one Stan or more specifically command Stan of the Stan interfaces command Stan has the lightest memory footprint Therefore it can fit larger and more complex models It has the fewest dependencies which makes it easier to run with limited environments such as clusters The output generated is in CSV format and can be post-processed using other Stan interfaces or general tools with that I want to go ahead and dive into Stan and talk about how to install Stan and also how to run a simple example model and Hopefully make a few more videos on more complex models to install command Stan First make sure you have g++ and make installed. This is assuming you have a Linux machine Load the latest release Then use tar dash xf to unpack it Then what you do is you cd into the command Stan home directory Then run make build If you're running a instance or your your machine has multiple cores You can do multiple cores with me but I was running a lightweight instance And so I just ran make build if the build is successful You'll see a message print with the version of command Stan So running an example involves four things first a Stan file second a JSON file Third what you need to do is actually compile the Stan file. This will make a binary fourth You need to run that binary on data I'm gonna go ahead and make a directory called Stan for all of my Stan programs and data Even though Stan comes with some example models I'm gonna go ahead and just copy and paste a program in this directory and and their data after I have a model and data I'm gonna cd back into the command Stan home directory because this is where all the Stan utilities are at this point We have finished steps one and two now it's time to compile a Stan file I found that I want to include the dot Stan file extension when I compile But this gives an error it seems that Stan wants to compile without the file extension So if I just pass the file name without the extension the compilation works great once the compilation is complete I can see the binary file along with the C++ header file now I run the binary on the data using the binary file name then Sample data file equals the JSON file name This is a simple program with a small amount of data So it finishes fast the result of this command is a output dot CSV file Most of the information in this file has to do with the sampler the only column that we are interested in is the theta column This is the posterior of our sample. It is common to run more than one chain I remember someone telling me that when you are developing a model You should run for small chains and when you're done testing things out you run two long chains We can do this with a small shell script We essentially write a for loop and each loop in the for loop is a sample chain Before you get heavy into writing Stan models I would suggest you go to github and grab a VIM package that will do syntax highlighting for Stan files I think it's a little bit easier to find mistakes when you have VIM plugin that does syntax highlighting for you and that's it with this you should be able to Install command Stan and run a simple program. Thanks for watching