PIET User Manual

Desktop controls, settings and command reference

PIET A.1.1 · CoBrA 1.1.0

New to PIET? Start with the built-in sample and run four commands. Use the contents below to look up a control, change a setting or check a command later.

Download PIET A.1.1

Install PIET and open a dataset

Choose the download for your operating system. PIET A.1.1 release

Platform Installation
Apple Silicon Mac, macOS 13.3 or later Open the arm64 DMG and drag PIET.app to Applications. The app includes the sample data.
Windows 10 or 11, x64 The installer adds PIET to the Start menu and copies the examples to Documents/PIET. For the portable edition, extract the entire ZIP and open PIET.exe. The examples are in the demo folder. WebView2 is required.
Ubuntu 24.04 or later, x86-64 Install the .deb and launch PIET from the applications menu. The examples are in /opt/piet/demo. For the tar.xz edition, extract the entire directory and run ./PIET. Copy the examples to a writable folder before running them.

Start a fresh session. Choose File ▾ → Open sample dataset. Enter the following commands one line at a time in the command box below Results. Press Enter after each line.

count
generate frate = fatal / pop * 10000
summarize frate
regress frate beertax

Expect 336 observations, a mean of 2.040 deaths per 10,000 residents, and a beer-tax coefficient of +0.3646. Each row is one state in one year. In Alabama in 1982, 839 deaths among about 3.94 million residents give a rate of 2.13 per 10,000. To investigate what the slope means, open the traffic fatalities lab.

Screen controls and shortcuts

Control What it does
Results · Run · ↓ latest Enter or Run executes the command in the input box. Output appears below the echoed command. Select ↓ latest to return to the newest output.
File ▾ · Recent Open Data… loads a dataset. Open do-file… opens a script in the editor for inspection. Open sample dataset loads the built-in panel. Recent reopens a previously opened file.
Run .do · Do-file Editor The toolbar’s Run .do opens a file picker and runs the chosen file immediately. Inside the editor, ▶ Run executes the entire buffer, including edits. ▶ Run selection executes the highlighted lines, or the entire buffer when nothing is selected. Clear empties the editor.
Data ▾ Data Browser displays observations and variables. Data Editor lets you change values. To repeat a correction later, put a replace command in your .do file.
Variables · History Search variable names and labels. Open the variable card to inspect its type and available statistics. Click a history entry to bring it back to the command line, or use → Do-file to send it to the editor.
Graphics Click a thumbnail to enlarge the plot. Use Prev and Next to move between plots and Back to gallery to return. Use the PNG export control or graph export to save a figure.
Split · Stack · Reset layout Split docks the editor or gallery beside Results. With both secondary views docked, Stack arranges them vertically. Reset layout restores the single-view tabs.
Save Results… · × clear Save Results… writes the visible console history to a text log. × clear clears the console. Use save separately to keep the dataset.
Cancel · Submit Cancel stops a running script. Earlier lines may already have changed the data. When a script requests input, enter a value and select Submit or select Cancel run.
About · Settings · appearance controls About shows version and license information. Settings opens the preferences. The style toggle switches between Boring and De Stijl. The theme toggle switches between Light and Dark.

Use ⌘ on macOS and Ctrl on Windows/Linux. With the editor focused, ⌘/Ctrl+Enter runs the buffer and ⌘/Ctrl+Shift+D runs the selection. ⌘/Ctrl+F searches the active editor or results pane. The editor also supports replacement. In the command box use ↑ and ↓ to recall commands. Esc closes the active overlay.

Settings and parallel processing

Setting How to use it
Scratch directory Select a local volume with room for temporary datasets. Select Apply, then restart PIET.
Default working directory Sets the base directory for relative file paths after Apply and a restart. In the current session, pwd shows the directory and cd “path” changes it.
Open do-files in their own folder When enabled, opening a script changes the working directory to its folder. An explicit cd or a configured default working directory takes precedence.
Export folder Destination for Save Results and GUI PNG exports. Leave it empty to choose a location each time. Scripted graph export uses the path in the command.
Compute cores · Memory budget Choose Auto or a core count and select Apply. The next command uses this budget for engine and BLAS threads. Memory budget helps size temporary parallel work, console history, graph retention and the automatic worker count.
Provenance hash Includes a hash of the input in the results so an archived analysis can be matched to its data. Off by default.
External-library compatibility names Enables names such as reghdfe, csdid and boottest. Change the persistent choice here or on first launch. The lab uses set extcompat on for its current session.
Table size limits Blank fields use the defaults of 12,000 one-way rows, 1,200 rows × 80 columns for two-way tables, and 375 cells with summarize(). Increase individual limits as needed. The overall caps are 1,000,000 cells or 200,000 with summarize().
Editor & results font size Changes text size in the editor, console and data browser.
Run pasted blocks immediately Enable to execute a multiline paste at once. When disabled, inspect the pasted block in the editor before running it.
Auto-summarize on load Runs summarize when a dataset opens and populates the variable cards. Off by default.
Follow system appearance Tracks the operating system’s light/dark preference. Selecting the toolbar theme manually switches this off.

Run two independent jobs

In Settings → Compute cores, select Auto or at least two cores, then Apply. Put this block in the editor and run it as a whole.

sysuse fatalities, clear
parallel, workers(2) {
    summarize beertax
    summarize unemp
}

Read the two means in script order, 0.5133 dollars per case and 7.3467% unemployment. A worker is a separate process. A core is part of the compute budget. Use workers(1) for a serial comparison. With the opening line parallel {, PIET chooses a worker count using the task count, cores, memory and scratch space. Give concurrent file-writing jobs distinct output names. Keep a regression and any test that reads its estimates together in ordinary sequential code.

The macOS release reported 2 tasks / 2 workers on standard error for this example. To see the message, save the block as parallel.do and run "/Applications/PIET.app/Contents/MacOS/piet_native" --do parallel.do from its folder. For two small summaries, process startup can dominate. The A.1.1 Windows build executes this block serially. Compute cores still governs internal engine threads. This release does not use set processors to configure the budget.

Commands and known limitations

The usual pattern is command, variables, condition, then a comma and options, written as command varlist if condition, options. For example, summarize beertax if year == 1988 summarizes one year’s tax observations. After an estimator, vce(cluster statenum) groups errors by state.

Task Commands to look up
Open, save and inspect sysuse, use, import delimited, import excel, save, export, describe, codebook, count, list, browse, summarize, tabulate
Construct and combine datasets generate, replace, egen, label variable, keep, drop, sort, collapse, merge, append, reshape, preserve, restore
Regression, panels and IV regress, xtset, xtreg, reghdfe, ivregress, ivreg2, ivreghdfe
Discrete and limited outcomes logit, probit, poisson, nbreg, xtpoisson, tobit, heckman
Policy evaluation and time series csdid, drdid, rdrobust, sdid, newey, prais
Test estimates, build tables and draw graphs predict, test, lincom, nlcom, estat, estimates, eststo, esttab, twoway, coefplot, graph export
Loops, resampling and parallel work foreach, forvalues, local, global, program define, bootstrap, jackknife, permute, boottest, parallel

Where a familiar command can behave differently

Scope Command or condition What to expect
Documented defect label list after reshape wide Value labels can appear in a different order. Check the mapping from codes to labels.
Documented defect tabulate a b, summarize(x) PIET computes the summary but does not draw the table. For group means, run preserve, then collapse (mean) x, by(a b), then list and restore.
Confirmed in the lab boottest after absorb(statenum year) The command reports a restriction after absorbing multiple effects. Keep the state effect in absorb() and enter i.year explicitly. The lab verifies the coefficient and runs the test that way.
Platform difference Unicode regular expressions and sdid on Windows ustrregexm() and ustrregexra() refuse characters above U+FFFF, including some emoji. With sdid, vce(bootstrap), standard errors can differ around the fourth significant digit across platforms.
Built-in datasets sysuse auto and other Stata examples The bundled PIET example is fatalities. Open your own copy of other datasets by file path.

A.1.1 retains the A.1.0 computation engine. In the published comparison with Stata 19.5, 32,148 of 39,290 test cases matched. For 3,872 cases PIET reported an unimplemented form that Stata ran. A further 1,596 cases used commands absent from PIET. Each case tests a combination of syntax, options, errors or stored results. The release notes identify remaining defects and do not give individual repair dates. Release notes and validation results

Command-name index

These names come from the macOS release’s --dump-registry. Option coverage varies by command. The compatibility name reghdfe maps to feols. Constructs handled elsewhere include do, foreach, forvalues, if, while, local, global, program, quietly, capture, by, bootstrap, jackknife and permute. Use your browser’s Find command to locate a name.

Data management and summaries (113)

_pctile append assert astile bcal browse bsample carryforward centile clear clonevar collapse contract count cross cumul decode destring distinct drawnorm drop ds duplicates egen encode expand fcollapse fillin fillmissing findname fmerge frame frames frget frlink gcollapse gduplicates gegen generate geodist geonear getmata gisid glevelsof gquantiles greshape gsort gstats gunique ihstrans insobs inspect integ ipolate isid joinby keep levelsof list lookfor markout mata mdesc merge mi missings misstable mkspline move mvdecode mvencode order pctile rangestat recode rename renpfix replace reshape sample sctorezone sencode separate sort split splitsample stack strdist stset summarize svmat tab1 tab2 table tabulate tostring tset tsfill tsfilter tsset tssmooth tsspell unab unique winsor winsor2 xi xpose xtdescribe xtile xtset xtsum xttab

Estimation, tests and postestimation (103)

acreg areg boottest chow cloglog corr csdid dfuller did_imputation drdid erepost ereturn estadd estat estimates estout estpost eststo esttab eventstudyinteract feols fepois fracreg frmttable glm gmm hausman heckman honestdid irf ivprobit ivreg ivreg2 ivreghdfe ivregress ivtobit lasso lassocoef leebounds lincom logistic logit lrtest margins mean mediate mixed ml mlogit nbreg newey nl nlcom oaxaca ologit oprobit outreg2 parmest pca poisson pperron ppmlhdfe prais predict probit proportion pwcorr qreg qreg2 rddensity rdrobust reg3 regress regsave ritest rlasso sdid sdtest signrank sktest spearman stcox streg suest sureg swindex tabout tabstat teffects test testparm tobit ttest var vargranger wntestq xtabond xtivreg2 xtlogit xtpoisson xtreg zinb zip

Graphs (20)

binscatter cdfplot coefplot event_plot graph grc1leg grc1leg2 histogram kdensity line lowess lpoly marginsplot rdplot scatter serset tsline twoway twoway__histogram_gen xtline

Files, input/output and paths (53)

ado adopath cd cf confirm copy dir dtaversion erase export file filefilter filelist findfile import infile infix input insheet log ls mat2txt mkdir net odbc outfile outsheet post postclose postfile postutil putexcel pwd rm rmdir save saveold shell spshape2dta ssc sysdir sysuse tex texdoc texsave type unzipfile use which winexec zipfile zipsave zipuse

Session, settings and metadata (35)

_dots char cls codebook compare compress datasignature describe display error exit format gr_edit grstyle label labelbook labmask labvars notes numlabel parallel pause preserve recast renvarlab renvars require restore set sleep splitvallabels svyset timer tolower version

Macros, matrices and returns (15)

fvexpand fvunab macro marksample matlist matrix matselrc matsort mkmat numlist return scalar sreturn tempvar tsunab

Save work and recover from errors

Keep the .do script for the sequence of commands, a .dta file for data and variable labels, and a .log for the readable results. Save graphs separately. For a reproducible handoff, record the PIET and engine versions, data source, clustering variable and random seed. A CSV export loses variable labels.

Symptom What to check
An exported figure is missing Run pwd for the working directory used by graph export. For GUI-created PNGs and logs, also check Settings → Export folder.
variable frate already defined A generate line ran twice. Save anything you need before restarting the script from the top. If resuming mid-script, skip lines that create existing variables.
no observations or variable not found Run count and describe. Check the sample, spelling, any setup steps and whether restore ran after collapse.
A command or option is rejected Inspect the first error and the preceding estimation command. Check the compatibility setting, spelling and comma placement. Rerun the setup and the affected section.
Results differ from the lab Check the 336-row sample (288 for lag regressions), variable units, fixed effects, 48 clusters and seed(42). The lab begins with sysuse fatalities. Importing a CSV can change storage precision.
Report a reproducible problem Include the version from About, operating system, shortest example using public data, expected result and actual result. PIET issues