Virata manual

The Virata manual

Virata reads a language that looks like Stata’s and does the work in Python. This is every command it understands, in plain English, with the technical word in brackets after it. Every example on this site was run while the page was being written.

What we have

  • 86 commands, each with its own page and a runnable example
  • 22 chart types
  • survey estimation with a real design, survival analysis, and the basics of time series
  • pandas shown for every command, and R for 46 of them

Coming later

  • nothing has been compared with real Stata; much of it is checked against R — what that means
  • panel data (xtset, xtreg)
  • postestimation: predict, test, margins
  • 84 more catalogue chart types

Getting data in and out

Opening a file, saving one, and finding your way around the folders.

Looking at what you have

Before you analyse anything, find out what is actually in the file.

Making and changing variables

Adding columns, fixing values, renaming, sorting, labelling.

Putting datasets together

Joining, stacking, summarising down to one row per group, reshaping.

Describing the numbers

Averages, tables, correlations and the two-group test.

Fitting models

Explaining one column with several others, whatever kind of column it is.

Survey data

Results that respect how the sample was drawn, not just how big it is.

How long until something happens

Time-to-event work, where some people have not had the event yet.

Series over time

Lags, differences, smoothing and seasonality.

Charts

Twenty-one chart types, each drawn as a self-contained web page.

Settings, help and the session

Switching language, protecting small numbers, macros, saved logs.

Reference