Stata index

Commands, functions, operators and prefixes are listed separately below. The link opens a preferred example; its chapter contains further variants.

Commands

  • about — Inspect R version and platform information
  • ac — Autocorrelation function
  • ado — Update installed packages
  • adopath — Inspect the package library search path
  • alpha — Estimate raw Cronbach alpha without reversing items
  • ameans — Compare arithmetic, geometric and harmonic means
  • anova — Analysis of variance
  • append — Stack two datasets
  • arch — ARCH(1) conditional-variance model
  • areg — Regression absorbing one categorical variable
  • arfima — Fractionally integrated ARMA estimation
  • arfimasoc — Fractional-ARMA order comparison
  • args — Receive two positional arguments in a function
  • arima — ARIMA model
  • arimasoc — ARMA information-criterion grid
  • assert — Stop when a condition fails
  • assertnested — Assert that districts belong to one region
  • avplots — Added-variable plots
  • bayesmh — Bayesian Gaussian regression with normal and inverse-gamma priors
  • bayespredict — Posterior mean Gaussian regression response
  • bayesreps — Replicated outcomes from a Gaussian posterior predictive distribution
  • bayesstats — Posterior means, standard deviations and quantiles
  • bayestest — Posterior probability of a positive slope
  • betareg — Fit beta regression with a logit mean link
  • binreg — Fit binomial regression on the or scale
  • binscatter — Binned scatter plot
  • biprobit — Fit jointly correlated binary probit equations
  • bitest — Test a binary success probability exactly
  • bitesti — Run an exact binomial test from counts
  • boottest — Null-imposed wild cluster bootstrap using rademacher weights
  • boxcox — Profile the Box-Cox response transformation parameter
  • brier — Calculate the overall Brier mean probability score
  • browse — View the data in a spreadsheet window
  • bsample — Draw a nonparametric row-bootstrap sample
  • bsqreg — Bootstrap quantile-regression inference
  • bstat — Summarize stored bootstrap estimates, bias and standard error
  • ca — Perform simple correspondence analysis of a contingency table
  • camat — Perform correspondence analysis of a supplied count matrix
  • candisc — Estimate canonical linear discriminant directions
  • canon — Estimate canonical correlations between two variable sets
  • carryforward — Carry the last observed value forward
  • cc — Case-control cross-product odds ratio
  • cci — Case-control cross-product odds ratio
  • cd — Change the working directory
  • cem — Coarsened exact matching on a categorical covariate
  • centile — Estimate a median and bootstrap its confidence interval
  • cf — Assert selected dataset values match
  • changeeol — Normalize a text file to Unix newlines
  • char — Store a custom column characteristic
  • checksum — Compute a file integrity digest
  • ci — Confidence interval of a mean
  • cii — Compute an exact proportion interval from counts
  • ciwidth — Calculate the anticipated full width of a mean interval
  • clear — Remove a dataset from memory
  • cloglog — Fit cloglog regression
  • clonevar — Copy a variable
  • cls — Clear the console
  • cluster — K-means clustering
  • clustermat — Cluster a precomputed dissimilarity matrix
  • cnsreg — Fit OLS with two coefficients constrained to equality
  • codebook — Describe every variable
  • coefplot — Coefficient plot
  • collapse — Replace the data with group means
  • compare — Compare value ordering and missingness
  • compress — Reduce safe whole-number storage to R integers
  • confirm — Check that a variable exists
  • constraint — Represent a linear equality constraint as a matrix
  • continue — Skip the rest of one loop iteration
  • contract — Replace observations with category frequencies
  • contrast — Form group contrasts against the reference category
  • copy — Copy a local file to a new path
  • corr2data — Generate pseudo-data with exactly specified sample moments
  • correlate — Correlation matrix (complete cases)
  • corrgram — Autocorrelation and partial-autocorrelation table
  • count — Number of rows
  • cpoisson — Fit a right-censored Poisson count model
  • creturn — Inspect R version, platform, paths and numeric limits
  • cross — Every combination of rows from two datasets
  • cs — Risk ratio and risk difference
  • csdid — Staggered difference in differences
  • csi — Risk ratio and risk difference
  • cumsp — Cumulative spectral distribution
  • cumul — Create the empirical cumulative distribution of a variable
  • dataex — Create reproducible R code for a small data example
  • datasignature — Store an exact R serialization for later comparison
  • decode — Turn labelled values into text
  • describe — List variables with their types and labels
  • destring — Text to numbers
  • dfbeta — Obtain standardized deletion influence on one slope
  • dfgls — DF-GLS unit-root test with constant
  • dfuller — ADF unit-root test with none and 0 augmentation lags
  • did_imputation — Untreated-outcome imputation effects by event time
  • didregress — Difference in differences (Stata 17+)
  • dir — List the files in the working directory
  • discrim — Fit LDA discriminant analysis
  • display — Calculate and show a result
  • distinct — Number of distinct combinations
  • do — Run a script file
  • dotplot — Show individual observations by category
  • drawnorm — Draw independent standard normal columns jointly
  • drdid — Two-period panel doubly robust DiD ATT point estimate
  • drop — Drop a variable
  • ds — List variable names
  • dstdize — Direct standardization of stratum-specific rates
  • dtable — Descriptive Table 1 (Stata 18+)
  • duplicates — Count duplicated rows
  • ebalance — Entropy balancing treated/control covariate moments through order 1
  • egen — Ten groups of about equal size
  • eivreg — Correct a simple regression slope for known predictor reliability
  • elasticnet — Fit cross-validated elasticnet linear prediction
  • encode — Turn text into labelled categories
  • ereturn — Model statistics
  • error — Raise a clear error from a function
  • esize — Estimate Cohen standardized mean differences for two independent groups
  • esizei — Compute a pooled-SD effect size from group summaries
  • estat — Information criteria
  • estimates — Keep a model for later
  • eststo — Store a model for a table
  • esttab — Regression table
  • etable — Table of the last model (Stata 17+)
  • eventstudyinteract — Sun-Abraham cohort-interacted event-study estimation
  • exit — Return early from a function
  • expand — Repeat each row n times
  • expandcl — Duplicate whole groups with fresh group identifiers
  • export — Export a CSV file
  • factor — Factor analysis
  • factormat — Fit maximum-likelihood factors from a correlation matrix
  • fcast — Iterated bivariate VAR point forecasts
  • fcollapse — Collapse means with the ftools public helper
  • file — Write and close a UTF-8 text connection
  • filefilter — Replace literal text throughout a small file
  • fillin — Add rows for every combination of values
  • findfile — Find a named file inside a specified directory
  • findit — Find the R equivalent of a Stata command
  • flevelsof — Store observed categories from the ftools levels helper
  • fmerge — Perform a validated ftools-style one-to-one merge
  • foreach — Same calculation for several variables
  • forecast — Eight-period ARIMA forecast
  • format — Display numbers with two decimals
  • forvalues — Loop with a condition
  • fracreg — Fit fractional logit regression with sandwich inference
  • fralias — Read linked values dynamically without storing a copied column
  • frame — Hold another dataset
  • fre — Frequency table with totals
  • frget — Copy a value through an established table link
  • frlink — Build a many-to-one row link to a lookup table
  • frunalias — Materialize a dynamically looked-up value as a column
  • ftools — Inspect the R data-manipulation package version and availability
  • gcollapse — Collapse group means using the gcollapse workflow
  • gcontract — Create category counts and percentages with gcontract
  • gdistinct — Count distinct values separately for several columns
  • gduplicates — Tag all duplicates of compound keys
  • gegen — Attach group means using a gegen-style workflow
  • gencohort — Create first-treatment cohorts including never-treated units
  • generate — Create a variable
  • getmata — Convert a matrix into named data columns
  • gettoken — Split the first simple token from the remaining text
  • gisid — Assert a unique complete identifier with gisid
  • glevelsof — Store sorted distinct categories with glevelsof
  • glm — Generalised linear model
  • global — Store a value for later use
  • gquantiles — Assign four empirical quantile categories
  • graph — Bar chart of group means
  • greshape — Gather explicitly named wide columns with greshape
  • gsort — Sort ascending and descending
  • gstats — Cap both tails at explicitly selected empirical quartiles
  • gtoplevelsof — Find the two most frequent complete categories
  • gunique — Count unique complete row-key combinations
  • hashsort — Stably sort by ascending group and descending value
  • hausman — Hausman comparison of fixed and random effects
  • heatplot — Heat map of the mean of z over binned x and y
  • heckman — Heckman selection model
  • help — Open the help page of a function
  • hetregress — Fit a normal mean model with multiplicative heteroskedasticity
  • hexdump — Inspect a file as hexadecimal byte values
  • histogram — Histogram
  • hotelling — Test a vector of means against zero with Hotelling T squared
  • icc — Estimate a one-way individual-measure intraclass correlation
  • if — Run code only if a condition holds
  • import — Import a CSV file
  • include — Execute helper code in the current evaluation environment
  • infile — Import whitespace-separated numeric fields
  • infix — Read adjacent fixed-width numeric fields
  • input — Type in a small dataset
  • insobs — Append two entirely missing observations
  • inspect — Distribution, zeros and missing values of a variable
  • intreg — Fit normal regression to interval-valued outcomes
  • ipolate — Keep boundary missing values outside the interpolation range
  • iqreg — Estimate slopes of the interquartile range
  • ir — Incidence-rate ratio and rate difference
  • irf — Reduced-form VAR(1) impulse-response matrices
  • iri — Incidence-rate ratio and rate difference
  • isid — Check that variables identify the rows
  • istdize — Indirect standardization and mortality ratio
  • ivlpirf — Instrumental-variable local-projection point responses
  • ivreg2 — Instrumental variables with robust errors
  • ivreghdfe — Instrumental variables with individual fixed effects
  • ivregress — Instrumental variables (2SLS)
  • jdbc — Load an entire SQL table through a DBI backend
  • joinby — All pairs of rows within each id
  • kap — Estimate unweighted Cohen kappa for two raters
  • kdensity — Density plot
  • keep — Keep some variables
  • kmatch — Entropy balancing treated/control covariate moments through order 1
  • ksmirnov — Kolmogorov-Smirnov test of equal distributions
  • ktau — Kendall’s tau
  • kwallis — Kruskal-Wallis test
  • label — Label every value of a categorical variable
  • labelbook — Inspect value-label dictionaries by column
  • labmask — Assign existing text values as numeric value labels
  • lasso — Fit cross-validated lasso linear prediction
  • levelsof — Distinct values of a variable
  • lincom — Linear combination of coefficients
  • line — Line plot
  • linktest — Regress an outcome on fitted values and their square
  • list — Print the first and last rows
  • local — Store a list of variable names
  • log — Record console output in a file
  • logistic — Logit model reported as odds ratios
  • logit — Logit model
  • lookfor — Find variables by name or label
  • lowess — Smoothed scatter plot
  • lpirf — Local-projection dynamic response to an external impulse
  • lrtest — Likelihood-ratio test
  • ltable — Actuarial life-table survival over fixed intervals
  • macro — List defined objects
  • manova — Test multivariate group differences using Pillai
  • manovatest — Test a factor term in a fitted multivariate model
  • margins — Average marginal effects
  • marginsplot — Plot predictive margins
  • mark — Create an inclusion marker from a condition
  • markin — Find the row range enclosing a selected sample
  • markout — Clear an inclusion marker when variables are incomplete
  • marksample — Mark complete rows over supplied column names
  • matlist — Format a numeric matrix for display
  • matname — Name matrix columns
  • matrix — Create a matrix
  • mca — Analyze multiple categorical variables through indicator MCA
  • mcc — McNemar comparison of matched binary exposures
  • mcci — McNemar comparison of matched binary exposures
  • mdesc — Missing values per variable
  • mds — Fit classical metric multidimensional scaling
  • mdsmat — Scale an existing dissimilarity matrix
  • mean — Mean with its standard error
  • mecloglog — Complementary-log-log random-intercept model with Laplace approximation
  • median — Run a two-group median test
  • meglm — Generalized mixed model with logit link
  • melogit — Multilevel logit
  • memory — Measure the memory occupied by one R table
  • menbreg — Negative-binomial mixed model with quadratic mean variance
  • menl — Nonlinear exponential growth with random asymptote coefficient
  • meologit — Random-intercept cumulative-logit model
  • meoprobit — Random-intercept cumulative-probit model
  • mepoisson — Poisson random-intercept model with Laplace approximation
  • meprobit — Probit random-intercept model with Laplace approximation
  • merge — Merge with a match report
  • meta — Declare generic effect sizes and sampling variances
  • mhodds — Mantel-Haenszel common odds ratio
  • mi — Multiple imputation
  • missings — Report missing-value counts by numeric variable
  • misstable — Missing values per variable
  • mixed — Multilevel (mixed) linear model
  • mkdir — Create a directory
  • mkmat — Create a matrix from selected numeric variables
  • mlexp — Maximize an explicitly defined normal likelihood
  • mlogit — Multinomial logit
  • mvdecode — Turn missing-value codes into missing
  • mvencode — Turn missing values into a code
  • mvreg — Fit multivariate multiple regression
  • mvtest — Compute Mardia multivariate skewness and kurtosis tests
  • nbreg — Negative binomial model
  • net — Install a package from GitHub
  • newey — Newey-West HAC coefficient inference
  • nl — Fit a nonlinear exponential mean curve
  • nlcom — Nonlinear combination of coefficients
  • notes — Attach a note to a variable
  • nptrend — Test an ordered trend in proportions
  • numlabel — Prefix each label with its numeric code
  • numlist — Expand a numeric list with a fixed step
  • oaxaca — Blinder-Oaxaca decomposition
  • odbc — Load selected rows from a SQL query
  • ologit — Ordered logit
  • oneway — One-way analysis of variance
  • oprobit — Ordered probit
  • order — Move variables to the front
  • orthog — Orthogonalize centered predictor columns in their stated order
  • orthpoly — Construct three orthogonal polynomial columns
  • outfile — Export plain numeric fields with Stata-style missing text
  • outreg2 — Regression table in a Word file
  • pac — Partial autocorrelation function
  • pca — Principal components
  • pcamat — Perform PCA directly on a correlation matrix
  • pchi — Compare empirical and chi-squared probabilities
  • pcorr — Compute the partial correlation of y and x controlling z
  • pctile — Quantile cutpoints
  • pergram — Raw periodogram
  • pnorm — Assess a standardized normal P-P relationship
  • poisson — Poisson model
  • post — Append one result observation
  • postclose — Persist an accumulated result table
  • postfile — Initialize a typed result accumulator
  • power — Plan the sample size for a onemean t test
  • pperron — Phillips-Perron Z-tau test with constant
  • ppmlhdfe — Poisson model with fixed effects
  • predict — Fitted values
  • predictnl — Apply a nonlinear prediction transform with delta-method standard errors
  • preserve — Keep a copy to return to
  • probit — Probit model
  • program — Write your own command
  • proportion — Proportion in each category
  • prtest — Test of a proportion
  • prtesti — Compare proportions from aggregate sample sizes
  • psdensity — Parametric AR(1) spectral density
  • psmatch2 — Propensity-score nearest matching with replacement
  • pstest — Standardized covariate balance before and after matching
  • putdocx — Write a table to Word
  • putexcel — Write results to Excel
  • putmata — Copy numeric columns into an R matrix
  • pwcompare — Compare all group pairs with Tukey simultaneous intervals
  • pwcorr — Pairwise correlations
  • pwd — Show the working directory
  • pwmean — Compare group means using Bonferroni-adjusted pooled tests
  • qchi — Compare sample quantiles with chi-squared quantiles
  • qnorm — Normal quantile plot
  • qqplot — Compare two empirical distributions with a Q-Q plot
  • qreg — Median (quantile) regression
  • quadchk — Sensitivity of mixed-logit estimates to quadrature points
  • quantile — Plot ordered data against cumulative fractions
  • query — Inspect current R output settings
  • range — Create an evenly spaced grid including endpoints
  • rangestat — Compute a mean over each closed numeric-key neighborhood
  • ranksum — Wilcoxon rank-sum (Mann-Whitney) test
  • rdbwdensity — Bandwidth selection for density discontinuity
  • rdbwselect — RD bandwidth selection: mserd
  • rddensity — Density continuity at the treatment threshold
  • rdrobust — Regression discontinuity
  • recast — Change the storage type
  • recode — Recode ranges of values
  • reghdfe — High-dimensional fixed effects
  • regress — Linear regression
  • rename — Rename a variable
  • replace — Change a variable
  • require — Require an installed R workflow dependency
  • reshape — Wide to long
  • return — See the results a command stored
  • robvar — Test equal group variances using median-centered Levene inference
  • roccomp — Compare paired marker ROC areas using DeLong inference
  • roctab — Estimate a nonparametric ROC area for a marker
  • rolling — Rolling-window regression coefficients
  • rotate — Rotate factor loadings using varimax
  • rotatemat — Rotate an externally supplied loading matrix
  • rreg — Robust regression
  • runtest — Test whether a binary threshold sequence has random runs
  • rvfplot — Residuals against fitted values
  • sample — Reproducible random sample of 1000 rows
  • save — Save as a Stata dataset
  • saveold — Save for an older Stata version
  • savespss — Save the data as an SPSS file
  • scalar — Store a single number
  • scatter — Scatter plot
  • sdtest — Compare variances of two independent normal samples
  • sdtesti — Compare variances from sample sizes and standard deviations
  • search — Search all installed help pages
  • sem — Structural equation model
  • separate — Create group-specific copies of a numeric column
  • seqvar — Create a specified integer sequence with a deliberate gap
  • serrbar — Plot supplied estimates and standard errors
  • set — Start a dataset with a given number of rows
  • setroot — Locate a project root from a marker file
  • signrank — Wilcoxon signed-rank test
  • signtest — Test the median paired difference using signs
  • sktest — Skewness and kurtosis
  • sleep — Pause execution using milliseconds converted to seconds
  • slogit — Fit a rank-one stereotype multinomial logit model
  • snapshot — Save a temporary on-disk data snapshot
  • snapspan — Convert snapshots to intervals with covariates applying forward
  • sort — Sort in ascending order
  • spbalance — Balance a spatial panel by retaining common time periods
  • spdistance — Distance between two identified planar locations
  • spearman — Spearman rank correlation
  • spgenerate — Compute a spatially lagged covariate
  • spikeplot — Plot spikes for the frequencies of distinct values
  • split — Split text into several variables
  • splitsample — Assign a balanced random half-split
  • spmatrix — Row-standardized inverse-distance spatial weights
  • spset — Declare planar point geometry and coordinate reference system
  • sqreg — Fit several conditional quantiles together
  • ssc — Install a package
  • sspace — Local-level state-space model
  • stack — Stack two columns vertically with a source indicator
  • stbase — Keep baseline record for each subject
  • stci — Median survival with confidence limits
  • stcox — Cox proportional hazards model
  • stcrreg — Fine-Gray subdistribution-hazard workflow
  • stdescribe — Describe single-record survival data
  • stem — Stem-and-leaf display
  • stfill — Carry observed covariates forward within survival subjects
  • stgen — Mark subjects ever exposed during their observed survival history
  • stintreg — Weibull regression for interval-censored outcomes
  • stir — Compare two incidence rates
  • stjoin — Rejoin adjacent constant-covariate spells
  • stmh — Mantel-Haenszel stratified incidence-rate-ratio point estimate
  • stptime — Crude incidence rate from person-time
  • strate — Group-specific rates per thousand person-time units
  • streg — Parametric survival model
  • sts — Kaplan-Meier curve
  • stset — Declare survival-time data
  • stsplit — Split risk intervals at fixed cut points
  • stsum — Summary of survival times
  • sttocc — Sample nested case-control risk sets from a cohort
  • stvary — Check within-subject covariate variation and missingness
  • summarize — Summary statistics for all variables
  • svmat — Convert matrix columns to named variables
  • svydescribe — Describe the survey design
  • svyset — Declare a survey design
  • swilk — Shapiro-Wilk normality test
  • symmetry — Test symmetry in a matched binary table
  • symmi — Test matched-table symmetry directly from cell counts
  • symplot — Check symmetry around the sample median
  • syntax — Validate a numeric column argument and an optional scalar
  • synth — Synthetic control
  • sysdir — Inspect R installation and temporary directories
  • sysuse — Load an example dataset
  • tab1 — One frequency table per variable
  • tab2 — Cross-tabulation of two variables
  • tabdisp — Display a complete table of precomputed cell values
  • tabi — Run a Pearson test from immediate cell counts
  • table — Joint frequencies of several variables
  • tabodds — Odds of disease by exposure category
  • tabstat — Chosen statistics by group
  • tabulate — One-way frequency table
  • tebalance — Covariate balance before and after weighting
  • teffects — Propensity-score matching
  • tempfile — A temporary file
  • tempname — Use a temporary scalar inside local scope
  • tempvar — Compute with a temporary vector in a local scope
  • teoverlap — Propensity-score overlap summary by treatment
  • test — Test a hypothesis about coefficients
  • testnl — Test an exponentiated coefficient with a nonlinear Wald test
  • testparm — Jointly test a categorical predictor
  • tetrachoric — Estimate a tetrachoric correlation by maximum likelihood
  • timer — Time how long code takes
  • tnbreg — Fit zero-truncated NB2 regression
  • tobit — Censored (tobit) regression
  • tokenize — Split simple whitespace-separated tokens
  • tostring — Numbers to text
  • tpoisson — Fit zero-truncated Poisson regression
  • truncreg — Fit a zero-left-truncated normal regression
  • tsfill — Add rows for missing time points
  • tsfilter — Hodrick-Prescott trend and cycle decomposition
  • tsline — Time-series line plot
  • tsreport — Locate missing time periods
  • tsset — Declare time-series data
  • tssmooth — Centered five-term moving average
  • ttest — Two-sample t test
  • ttesti — Run a one-mean t test from summary statistics
  • twoway — Scatter plot with a fitted line
  • type — Read lines from a UTF-8 text file
  • ucm — Unobserved components: level
  • unab — Expand a column-name prefix wildcard
  • unabcmd — Resolve a unique abbreviation among known R choices
  • unicode — Convert a Latin-1 text file to UTF-8
  • univar — Detailed univariate statistics
  • unzipfile — Extract a ZIP archive into a chosen temporary directory
  • use — Open a Stata dataset
  • uselabel — Make a value-label dictionary table
  • var — Unrestricted bivariate VAR(1) by equation OLS
  • vargranger — Test whether x Granger-predicts y
  • varstable — Eigenvalues of the VAR(1) companion matrix
  • vec — Rank-one vector error-correction model
  • vecrank — Johansen trace rank test with a restricted constant
  • version — Version control
  • viewsource — Inspect the body of a named R function
  • vif — Variance inflation factors
  • vioplot — Violin plot
  • webuse — Load an example dataset from the Stata website
  • which — Where a command comes from
  • while — Repeat while a condition holds
  • winsor2 — Winsorise at the 1st and 99th percentiles
  • wntestq — Ljung-Box serial-correlation portmanteau test
  • xcorr — Cross-correlation at positive and negative lags
  • xi — Create indicator variables omitting the lowest category
  • xpose — Transpose the data
  • xtabond — Dynamic panel (Arellano-Bond)
  • xtcloglog — Random-intercept panel cloglog
  • xtdescribe — How many periods each panel unit has
  • xtdidregress — Panel difference-in-differences with unit and period fixed effects
  • xtdpd — One-step difference GMM for a dynamic panel
  • xtdpdsys — System GMM with level and differenced equations
  • xtgee — gaussian GEE with independence working correlation
  • xtgls — Group-heteroskedastic panel GLS by maximum likelihood
  • xthtaylor — Hausman-Taylor model with time-varying and invariant endogenous covariates
  • xtile — Quantile groups
  • xtivreg — Fixed-effects instrumental-variable regression
  • xtline — One line plot per panel unit
  • xtlogit — Conditional (fixed-effects) logit
  • xtologit — Random-intercept cumulative-logit model
  • xtoprobit — Random-intercept cumulative-probit model
  • xtpcse — Beck-Katz panel-corrected covariance
  • xtpoisson — Fixed-effects Poisson
  • xtprobit — Random-intercept panel probit
  • xtrc — Random-coefficient panel model workflow
  • xtreg — Panel fixed effects
  • xtregar — Random intercept with AR(1) residual correlation
  • xtscc — Driscoll-Kraay covariance
  • xtset — Declare panel data
  • xtsum — Overall and within standard deviations
  • xttest0 — Breusch-Pagan test of individual random effects
  • xtunitroot — Panel unit-root test: levinlin
  • zinb — Fit a zero-inflated NB2 count model
  • zip — Fit zero-inflated Poisson with logit zero inflation
  • zipfile — Create a ZIP archive containing a text file
  • ztest — Test a mean using a known population standard deviation
  • ztesti — Compare independent means from known-variance summaries

Functions

  • betaden — Evaluate the beta density
  • binomial — Compute an inclusive binomial lower tail
  • binomialp — Evaluate a binomial probability mass
  • binomialtail — Compute an inclusive binomial upper tail
  • binormal — Evaluate a correlated bivariate normal probability
  • cauchy — Evaluate the Cauchy cumulative probability
  • cauchyden — Evaluate the Cauchy density
  • cauchytail — Evaluate the Cauchy upper-tail probability
  • ceil — Round up
  • chi2 — Evaluate the chi-squared cumulative probability
  • chi2den — Evaluate the chi-squared density
  • chi2tail — Evaluate the chi-squared upper-tail probability
  • clock — Text to a date-time
  • cofd — Convert R dates to Stata midnight millisecond codes
  • cond — One value if a condition holds, another if not
  • date — Text to a date
  • day — Day of the month
  • daysinmonth — Get the number of days in each calendar month
  • dofc — Convert Stata millisecond datetimes to dates
  • dofm — First day of a monthly period
  • dofq — Convert Stata quarterly codes to quarter-start dates
  • dofy — Construct the first day of each year
  • dow — Day of the week
  • doy — Extract day-of-year numbers
  • exponential — Evaluate the exponential cumulative probability
  • exponentialden — Evaluate the exponential density
  • exponentialtail — Evaluate the exponential upper-tail probability
  • F — Evaluate the F cumulative probability
  • Fden — Evaluate the F density
  • firstdayofmonth — Find the first date of each calendar month
  • floor — Round down
  • Ftail — Evaluate the F upper-tail probability
  • gammaden — Evaluate the gamma density
  • gammap — Evaluate the gamma cumulative probability
  • gammaptail — Evaluate the gamma upper-tail probability
  • halfyear — Extract half-year numbers
  • hh — Extract the hour from a UTC timestamp
  • hypergeometric — Compute an inclusive hypergeometric lower tail
  • hypergeometricp — Evaluate a hypergeometric probability mass
  • ibeta — Evaluate the beta cumulative probability
  • ibetatail — Evaluate the beta upper-tail probability
  • inlist — Whether x equals any listed value
  • inrange — Whether x lies within a range
  • invbinomial — Solve a binomial CDF for its success probability
  • invbinomialtail — Solve an inclusive binomial tail for success probability
  • invcauchy — Find the Cauchy 90th percentile
  • invcauchytail — Find a Cauchy upper-tail critical value
  • invchi2 — Find the chi-squared 90th percentile
  • invchi2tail — Find a chi-squared upper-tail critical value
  • invexponential — Find the exponential 90th percentile
  • invexponentialtail — Find a exponential upper-tail critical value
  • invF — Find the F 90th percentile
  • invFtail — Find a F upper-tail critical value
  • invgammap — Find the gamma 90th percentile
  • invgammaptail — Find a gamma upper-tail critical value
  • invibeta — Find the beta 90th percentile
  • invibetatail — Find a beta upper-tail critical value
  • invlogistic — Find the logistic 90th percentile
  • invlogistictail — Find a logistic upper-tail critical value
  • invnbinomial — Solve a negative-binomial CDF for success probability
  • invnbinomialtail — Solve a negative-binomial tail for success probability
  • invnchi2 — Find a nchi2 noncentral critical value
  • invnchi2tail — Find a nchi2 noncentral upper-tail critical value
  • invnF — Find a nF noncentral critical value
  • invnFtail — Find a nF noncentral upper-tail critical value
  • invnibeta — Find a nibeta noncentral critical value
  • invnormal — Find the standard normal 90th percentile
  • invnt — Find a nt noncentral critical value
  • invnttail — Find a nt noncentral upper-tail critical value
  • invpoisson — Solve a Poisson CDF for its mean
  • invpoissontail — Solve an inclusive Poisson tail for its mean
  • invt — Find the Student t 90th percentile
  • invttail — Find a Student t upper-tail critical value
  • invtukeyprob — Find a Tukey simultaneous-comparison critical value
  • invweibull — Find the Weibull 90th percentile
  • invweibullph — Find a PH Weibull percentile
  • invweibullphtail — Find a PH Weibull upper-tail quantile
  • invweibulltail — Find a Weibull upper-tail critical value
  • ln — Natural logarithm
  • lncauchyden — Evaluate a Cauchy log density
  • lnigammaden — Evaluate an inverse-gamma log density
  • lnmvnormalden — Evaluate a multivariate normal log density
  • lnnormal — Compute a stable extreme normal log probability
  • lnnormalden — Evaluate a normal log density with location and scale
  • logisticden — Evaluate the logistic density
  • logistictail — Evaluate the logistic upper-tail probability
  • lower — Lower case
  • mdy — Date from year, month and day
  • missing — Whether a value is missing
  • mm — Extract the minute from a UTC timestamp
  • mofd — Monthly period from a date
  • month — Month of a date
  • nbetaden — Evaluate the nibeta noncentral density
  • nbinomial — Compute an inclusive nbinomial lower tail
  • nbinomialp — Evaluate a nbinomial probability mass
  • nbinomialtail — Compute an inclusive nbinomial upper tail
  • nchi2 — Evaluate the nchi2 noncentral CDF
  • nchi2den — Evaluate the nchi2 noncentral density
  • nchi2tail — Evaluate the nchi2 noncentral upper tail
  • nF — Evaluate the nF noncentral CDF
  • nFden — Evaluate the nF noncentral density
  • nFtail — Evaluate the nF noncentral upper tail
  • nibeta — Evaluate the nibeta noncentral CDF
  • normal — Evaluate the standard normal cumulative probability
  • normalden — Evaluate the standard normal density
  • npnchi2 — Solve a noncentral chi-squared probability for noncentrality
  • npnF — Solve a noncentral F probability for noncentrality
  • npnt — Solve a noncentral t probability for noncentrality
  • nt — Evaluate the nt noncentral CDF
  • nttail — Evaluate the nt noncentral upper tail
  • poissonp — Evaluate a poisson probability mass
  • poissontail — Compute an inclusive poisson upper tail
  • qofd — Quarterly period from a date
  • quarter — Extract calendar quarter numbers
  • rbeta — Simulate rbeta variates
  • rbinomial — Simulate rbinomial variates
  • rcauchy — Simulate rcauchy variates
  • rchi2 — Simulate rchi2 variates
  • real — Text to a number
  • regexm — Match a regular expression
  • regexr — Replace the first regular-expression match
  • regexreplaceall — Replace all numeric runs in text
  • regexs — Extract the matching text
  • rexponential — Simulate rexponential variates
  • rgamma — Simulate rgamma variates
  • rhypergeometric — Simulate rhypergeometric variates
  • rlogistic — Simulate rlogistic variates
  • rnbinomial — Simulate rnbinomial variates
  • rnormal — Normal random numbers
  • round — Round
  • rpoisson — Simulate rpoisson variates
  • rt — Simulate rt variates
  • runiform — Uniform random numbers
  • rweibull — Simulate rweibull variates
  • ss — Extract seconds from a UTC timestamp
  • string — Number to text
  • stritrim — Collapse repeated spaces
  • strlen — Length of a string
  • strlower — Lower case
  • strltrim — Trim leading ASCII spaces only
  • strmatch — Match a wildcard pattern
  • strofreal — Format a number as zero-padded text
  • strpos — Whether a string contains some text
  • strproper — Title case
  • strreverse — Reverse plain ASCII text
  • strrtrim — Trim trailing ASCII spaces only
  • strtoname — Turn text into a valid name
  • strtrim — Remove leading and trailing spaces
  • strupper — Upper case
  • subinstr — Replace text
  • subinword — Replace a complete word in simple ASCII text
  • substr — Part of a string
  • sum — Running sum
  • t — Evaluate the Student t cumulative probability
  • tden — Evaluate the Student t density
  • ttail — Evaluate the Student t upper-tail probability
  • tukeyprob — Evaluate a studentized-range cumulative probability
  • uchar — Create characters from Unicode code points
  • upper — Upper case
  • ustrlen — Count Unicode code points
  • ustrlower — Lowercase Unicode text with an explicit locale
  • ustrnormalize — Normalize canonically equivalent Unicode text
  • ustrpos — Locate a Unicode substring by code-point position
  • ustrregexm — Unicode-aware regular expression, ignoring case
  • ustrregexra — Replace every ICU regex match
  • ustrregexrf — Replace the first ICU regex match
  • ustrreverse — Reverse Unicode code-point order
  • ustrtrim — Trim Unicode whitespace
  • ustrupper — Uppercase Unicode text with an explicit locale
  • usubstr — Extract one Unicode code point by position
  • weibull — Evaluate the Weibull cumulative probability
  • weibullden — Evaluate the Weibull density
  • weibullph — Use the proportional-hazards Weibull parameterization
  • weibullphden — Evaluate a PH Weibull density
  • weibullphtail — Evaluate a PH Weibull survivor probability
  • weibulltail — Evaluate the Weibull upper-tail probability
  • word — The first word of a string
  • wordcount — Number of words
  • year — Year of a date
  • ym — Construct Stata monthly codes from year and month
  • yq — Construct Stata quarterly codes from year and quarter

Operators

  • d. — First difference within each panel
  • f. — Lead within each panel
  • l. — Lag within each panel

Prefixes

  • bayesboot — Use Bayesian-bootstrap Dirichlet weights for a slope
  • bootstrap — Bootstrap standard errors
  • capture — Run code and report success instead of stopping
  • jackknife — Jackknife standard errors
  • nestreg — Compare successively added regression blocks
  • permute — Generate a permutation distribution for a regression slope
  • quietly — Run without printing
  • simulate — Simulate the sampling distribution of a normal sample mean
  • svy — Survey-weighted mean