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 informationac— Autocorrelation functionado— Update installed packagesadopath— Inspect the package library search pathalpha— Estimate raw Cronbach alpha without reversing itemsameans— Compare arithmetic, geometric and harmonic meansanova— Analysis of varianceappend— Stack two datasetsarch— ARCH(1) conditional-variance modelareg— Regression absorbing one categorical variablearfima— Fractionally integrated ARMA estimationarfimasoc— Fractional-ARMA order comparisonargs— Receive two positional arguments in a functionarima— ARIMA modelarimasoc— ARMA information-criterion gridassert— Stop when a condition failsassertnested— Assert that districts belong to one regionavplots— Added-variable plotsbayesmh— Bayesian Gaussian regression with normal and inverse-gamma priorsbayespredict— Posterior mean Gaussian regression responsebayesreps— Replicated outcomes from a Gaussian posterior predictive distributionbayesstats— Posterior means, standard deviations and quantilesbayestest— Posterior probability of a positive slopebetareg— Fit beta regression with a logit mean linkbinreg— Fit binomial regression on the or scalebinscatter— Binned scatter plotbiprobit— Fit jointly correlated binary probit equationsbitest— Test a binary success probability exactlybitesti— Run an exact binomial test from countsboottest— Null-imposed wild cluster bootstrap using rademacher weightsboxcox— Profile the Box-Cox response transformation parameterbrier— Calculate the overall Brier mean probability scorebrowse— View the data in a spreadsheet windowbsample— Draw a nonparametric row-bootstrap samplebsqreg— Bootstrap quantile-regression inferencebstat— Summarize stored bootstrap estimates, bias and standard errorca— Perform simple correspondence analysis of a contingency tablecamat— Perform correspondence analysis of a supplied count matrixcandisc— Estimate canonical linear discriminant directionscanon— Estimate canonical correlations between two variable setscarryforward— Carry the last observed value forwardcc— Case-control cross-product odds ratiocci— Case-control cross-product odds ratiocd— Change the working directorycem— Coarsened exact matching on a categorical covariatecentile— Estimate a median and bootstrap its confidence intervalcf— Assert selected dataset values matchchangeeol— Normalize a text file to Unix newlineschar— Store a custom column characteristicchecksum— Compute a file integrity digestci— Confidence interval of a meancii— Compute an exact proportion interval from countsciwidth— Calculate the anticipated full width of a mean intervalclear— Remove a dataset from memorycloglog— Fit cloglog regressionclonevar— Copy a variablecls— Clear the consolecluster— K-means clusteringclustermat— Cluster a precomputed dissimilarity matrixcnsreg— Fit OLS with two coefficients constrained to equalitycodebook— Describe every variablecoefplot— Coefficient plotcollapse— Replace the data with group meanscompare— Compare value ordering and missingnesscompress— Reduce safe whole-number storage to R integersconfirm— Check that a variable existsconstraint— Represent a linear equality constraint as a matrixcontinue— Skip the rest of one loop iterationcontract— Replace observations with category frequenciescontrast— Form group contrasts against the reference categorycopy— Copy a local file to a new pathcorr2data— Generate pseudo-data with exactly specified sample momentscorrelate— Correlation matrix (complete cases)corrgram— Autocorrelation and partial-autocorrelation tablecount— Number of rowscpoisson— Fit a right-censored Poisson count modelcreturn— Inspect R version, platform, paths and numeric limitscross— Every combination of rows from two datasetscs— Risk ratio and risk differencecsdid— Staggered difference in differencescsi— Risk ratio and risk differencecumsp— Cumulative spectral distributioncumul— Create the empirical cumulative distribution of a variabledataex— Create reproducible R code for a small data exampledatasignature— Store an exact R serialization for later comparisondecode— Turn labelled values into textdescribe— List variables with their types and labelsdestring— Text to numbersdfbeta— Obtain standardized deletion influence on one slopedfgls— DF-GLS unit-root test with constantdfuller— ADF unit-root test with none and 0 augmentation lagsdid_imputation— Untreated-outcome imputation effects by event timedidregress— Difference in differences (Stata 17+)dir— List the files in the working directorydiscrim— Fit LDA discriminant analysisdisplay— Calculate and show a resultdistinct— Number of distinct combinationsdo— Run a script filedotplot— Show individual observations by categorydrawnorm— Draw independent standard normal columns jointlydrdid— Two-period panel doubly robust DiD ATT point estimatedrop— Drop a variableds— List variable namesdstdize— Direct standardization of stratum-specific ratesdtable— Descriptive Table 1 (Stata 18+)duplicates— Count duplicated rowsebalance— Entropy balancing treated/control covariate moments through order 1egen— Ten groups of about equal sizeeivreg— Correct a simple regression slope for known predictor reliabilityelasticnet— Fit cross-validated elasticnet linear predictionencode— Turn text into labelled categoriesereturn— Model statisticserror— Raise a clear error from a functionesize— Estimate Cohen standardized mean differences for two independent groupsesizei— Compute a pooled-SD effect size from group summariesestat— Information criteriaestimates— Keep a model for latereststo— Store a model for a tableesttab— Regression tableetable— Table of the last model (Stata 17+)eventstudyinteract— Sun-Abraham cohort-interacted event-study estimationexit— Return early from a functionexpand— Repeat each row n timesexpandcl— Duplicate whole groups with fresh group identifiersexport— Export a CSV filefactor— Factor analysisfactormat— Fit maximum-likelihood factors from a correlation matrixfcast— Iterated bivariate VAR point forecastsfcollapse— Collapse means with the ftools public helperfile— Write and close a UTF-8 text connectionfilefilter— Replace literal text throughout a small filefillin— Add rows for every combination of valuesfindfile— Find a named file inside a specified directoryfindit— Find the R equivalent of a Stata commandflevelsof— Store observed categories from the ftools levels helperfmerge— Perform a validated ftools-style one-to-one mergeforeach— Same calculation for several variablesforecast— Eight-period ARIMA forecastformat— Display numbers with two decimalsforvalues— Loop with a conditionfracreg— Fit fractional logit regression with sandwich inferencefralias— Read linked values dynamically without storing a copied columnframe— Hold another datasetfre— Frequency table with totalsfrget— Copy a value through an established table linkfrlink— Build a many-to-one row link to a lookup tablefrunalias— Materialize a dynamically looked-up value as a columnftools— Inspect the R data-manipulation package version and availabilitygcollapse— Collapse group means using the gcollapse workflowgcontract— Create category counts and percentages with gcontractgdistinct— Count distinct values separately for several columnsgduplicates— Tag all duplicates of compound keysgegen— Attach group means using a gegen-style workflowgencohort— Create first-treatment cohorts including never-treated unitsgenerate— Create a variablegetmata— Convert a matrix into named data columnsgettoken— Split the first simple token from the remaining textgisid— Assert a unique complete identifier with gisidglevelsof— Store sorted distinct categories with glevelsofglm— Generalised linear modelglobal— Store a value for later usegquantiles— Assign four empirical quantile categoriesgraph— Bar chart of group meansgreshape— Gather explicitly named wide columns with greshapegsort— Sort ascending and descendinggstats— Cap both tails at explicitly selected empirical quartilesgtoplevelsof— Find the two most frequent complete categoriesgunique— Count unique complete row-key combinationshashsort— Stably sort by ascending group and descending valuehausman— Hausman comparison of fixed and random effectsheatplot— Heat map of the mean of z over binned x and yheckman— Heckman selection modelhelp— Open the help page of a functionhetregress— Fit a normal mean model with multiplicative heteroskedasticityhexdump— Inspect a file as hexadecimal byte valueshistogram— Histogramhotelling— Test a vector of means against zero with Hotelling T squaredicc— Estimate a one-way individual-measure intraclass correlationif— Run code only if a condition holdsimport— Import a CSV fileinclude— Execute helper code in the current evaluation environmentinfile— Import whitespace-separated numeric fieldsinfix— Read adjacent fixed-width numeric fieldsinput— Type in a small datasetinsobs— Append two entirely missing observationsinspect— Distribution, zeros and missing values of a variableintreg— Fit normal regression to interval-valued outcomesipolate— Keep boundary missing values outside the interpolation rangeiqreg— Estimate slopes of the interquartile rangeir— Incidence-rate ratio and rate differenceirf— Reduced-form VAR(1) impulse-response matricesiri— Incidence-rate ratio and rate differenceisid— Check that variables identify the rowsistdize— Indirect standardization and mortality ratioivlpirf— Instrumental-variable local-projection point responsesivreg2— Instrumental variables with robust errorsivreghdfe— Instrumental variables with individual fixed effectsivregress— Instrumental variables (2SLS)jdbc— Load an entire SQL table through a DBI backendjoinby— All pairs of rows within each idkap— Estimate unweighted Cohen kappa for two raterskdensity— Density plotkeep— Keep some variableskmatch— Entropy balancing treated/control covariate moments through order 1ksmirnov— Kolmogorov-Smirnov test of equal distributionsktau— Kendall’s taukwallis— Kruskal-Wallis testlabel— Label every value of a categorical variablelabelbook— Inspect value-label dictionaries by columnlabmask— Assign existing text values as numeric value labelslasso— Fit cross-validated lasso linear predictionlevelsof— Distinct values of a variablelincom— Linear combination of coefficientsline— Line plotlinktest— Regress an outcome on fitted values and their squarelist— Print the first and last rowslocal— Store a list of variable nameslog— Record console output in a filelogistic— Logit model reported as odds ratioslogit— Logit modellookfor— Find variables by name or labellowess— Smoothed scatter plotlpirf— Local-projection dynamic response to an external impulselrtest— Likelihood-ratio testltable— Actuarial life-table survival over fixed intervalsmacro— List defined objectsmanova— Test multivariate group differences using Pillaimanovatest— Test a factor term in a fitted multivariate modelmargins— Average marginal effectsmarginsplot— Plot predictive marginsmark— Create an inclusion marker from a conditionmarkin— Find the row range enclosing a selected samplemarkout— Clear an inclusion marker when variables are incompletemarksample— Mark complete rows over supplied column namesmatlist— Format a numeric matrix for displaymatname— Name matrix columnsmatrix— Create a matrixmca— Analyze multiple categorical variables through indicator MCAmcc— McNemar comparison of matched binary exposuresmcci— McNemar comparison of matched binary exposuresmdesc— Missing values per variablemds— Fit classical metric multidimensional scalingmdsmat— Scale an existing dissimilarity matrixmean— Mean with its standard errormecloglog— Complementary-log-log random-intercept model with Laplace approximationmedian— Run a two-group median testmeglm— Generalized mixed model with logit linkmelogit— Multilevel logitmemory— Measure the memory occupied by one R tablemenbreg— Negative-binomial mixed model with quadratic mean variancemenl— Nonlinear exponential growth with random asymptote coefficientmeologit— Random-intercept cumulative-logit modelmeoprobit— Random-intercept cumulative-probit modelmepoisson— Poisson random-intercept model with Laplace approximationmeprobit— Probit random-intercept model with Laplace approximationmerge— Merge with a match reportmeta— Declare generic effect sizes and sampling variancesmhodds— Mantel-Haenszel common odds ratiomi— Multiple imputationmissings— Report missing-value counts by numeric variablemisstable— Missing values per variablemixed— Multilevel (mixed) linear modelmkdir— Create a directorymkmat— Create a matrix from selected numeric variablesmlexp— Maximize an explicitly defined normal likelihoodmlogit— Multinomial logitmvdecode— Turn missing-value codes into missingmvencode— Turn missing values into a codemvreg— Fit multivariate multiple regressionmvtest— Compute Mardia multivariate skewness and kurtosis testsnbreg— Negative binomial modelnet— Install a package from GitHubnewey— Newey-West HAC coefficient inferencenl— Fit a nonlinear exponential mean curvenlcom— Nonlinear combination of coefficientsnotes— Attach a note to a variablenptrend— Test an ordered trend in proportionsnumlabel— Prefix each label with its numeric codenumlist— Expand a numeric list with a fixed stepoaxaca— Blinder-Oaxaca decompositionodbc— Load selected rows from a SQL queryologit— Ordered logitoneway— One-way analysis of varianceoprobit— Ordered probitorder— Move variables to the frontorthog— Orthogonalize centered predictor columns in their stated orderorthpoly— Construct three orthogonal polynomial columnsoutfile— Export plain numeric fields with Stata-style missing textoutreg2— Regression table in a Word filepac— Partial autocorrelation functionpca— Principal componentspcamat— Perform PCA directly on a correlation matrixpchi— Compare empirical and chi-squared probabilitiespcorr— Compute the partial correlation of y and x controlling zpctile— Quantile cutpointspergram— Raw periodogrampnorm— Assess a standardized normal P-P relationshippoisson— Poisson modelpost— Append one result observationpostclose— Persist an accumulated result tablepostfile— Initialize a typed result accumulatorpower— Plan the sample size for a onemean t testpperron— Phillips-Perron Z-tau test with constantppmlhdfe— Poisson model with fixed effectspredict— Fitted valuespredictnl— Apply a nonlinear prediction transform with delta-method standard errorspreserve— Keep a copy to return toprobit— Probit modelprogram— Write your own commandproportion— Proportion in each categoryprtest— Test of a proportionprtesti— Compare proportions from aggregate sample sizespsdensity— Parametric AR(1) spectral densitypsmatch2— Propensity-score nearest matching with replacementpstest— Standardized covariate balance before and after matchingputdocx— Write a table to Wordputexcel— Write results to Excelputmata— Copy numeric columns into an R matrixpwcompare— Compare all group pairs with Tukey simultaneous intervalspwcorr— Pairwise correlationspwd— Show the working directorypwmean— Compare group means using Bonferroni-adjusted pooled testsqchi— Compare sample quantiles with chi-squared quantilesqnorm— Normal quantile plotqqplot— Compare two empirical distributions with a Q-Q plotqreg— Median (quantile) regressionquadchk— Sensitivity of mixed-logit estimates to quadrature pointsquantile— Plot ordered data against cumulative fractionsquery— Inspect current R output settingsrange— Create an evenly spaced grid including endpointsrangestat— Compute a mean over each closed numeric-key neighborhoodranksum— Wilcoxon rank-sum (Mann-Whitney) testrdbwdensity— Bandwidth selection for density discontinuityrdbwselect— RD bandwidth selection: mserdrddensity— Density continuity at the treatment thresholdrdrobust— Regression discontinuityrecast— Change the storage typerecode— Recode ranges of valuesreghdfe— High-dimensional fixed effectsregress— Linear regressionrename— Rename a variablereplace— Change a variablerequire— Require an installed R workflow dependencyreshape— Wide to longreturn— See the results a command storedrobvar— Test equal group variances using median-centered Levene inferenceroccomp— Compare paired marker ROC areas using DeLong inferenceroctab— Estimate a nonparametric ROC area for a markerrolling— Rolling-window regression coefficientsrotate— Rotate factor loadings using varimaxrotatemat— Rotate an externally supplied loading matrixrreg— Robust regressionruntest— Test whether a binary threshold sequence has random runsrvfplot— Residuals against fitted valuessample— Reproducible random sample of 1000 rowssave— Save as a Stata datasetsaveold— Save for an older Stata versionsavespss— Save the data as an SPSS filescalar— Store a single numberscatter— Scatter plotsdtest— Compare variances of two independent normal samplessdtesti— Compare variances from sample sizes and standard deviationssearch— Search all installed help pagessem— Structural equation modelseparate— Create group-specific copies of a numeric columnseqvar— Create a specified integer sequence with a deliberate gapserrbar— Plot supplied estimates and standard errorsset— Start a dataset with a given number of rowssetroot— Locate a project root from a marker filesignrank— Wilcoxon signed-rank testsigntest— Test the median paired difference using signssktest— Skewness and kurtosissleep— Pause execution using milliseconds converted to secondsslogit— Fit a rank-one stereotype multinomial logit modelsnapshot— Save a temporary on-disk data snapshotsnapspan— Convert snapshots to intervals with covariates applying forwardsort— Sort in ascending orderspbalance— Balance a spatial panel by retaining common time periodsspdistance— Distance between two identified planar locationsspearman— Spearman rank correlationspgenerate— Compute a spatially lagged covariatespikeplot— Plot spikes for the frequencies of distinct valuessplit— Split text into several variablessplitsample— Assign a balanced random half-splitspmatrix— Row-standardized inverse-distance spatial weightsspset— Declare planar point geometry and coordinate reference systemsqreg— Fit several conditional quantiles togetherssc— Install a packagesspace— Local-level state-space modelstack— Stack two columns vertically with a source indicatorstbase— Keep baseline record for each subjectstci— Median survival with confidence limitsstcox— Cox proportional hazards modelstcrreg— Fine-Gray subdistribution-hazard workflowstdescribe— Describe single-record survival datastem— Stem-and-leaf displaystfill— Carry observed covariates forward within survival subjectsstgen— Mark subjects ever exposed during their observed survival historystintreg— Weibull regression for interval-censored outcomesstir— Compare two incidence ratesstjoin— Rejoin adjacent constant-covariate spellsstmh— Mantel-Haenszel stratified incidence-rate-ratio point estimatestptime— Crude incidence rate from person-timestrate— Group-specific rates per thousand person-time unitsstreg— Parametric survival modelsts— Kaplan-Meier curvestset— Declare survival-time datastsplit— Split risk intervals at fixed cut pointsstsum— Summary of survival timessttocc— Sample nested case-control risk sets from a cohortstvary— Check within-subject covariate variation and missingnesssummarize— Summary statistics for all variablessvmat— Convert matrix columns to named variablessvydescribe— Describe the survey designsvyset— Declare a survey designswilk— Shapiro-Wilk normality testsymmetry— Test symmetry in a matched binary tablesymmi— Test matched-table symmetry directly from cell countssymplot— Check symmetry around the sample mediansyntax— Validate a numeric column argument and an optional scalarsynth— Synthetic controlsysdir— Inspect R installation and temporary directoriessysuse— Load an example datasettab1— One frequency table per variabletab2— Cross-tabulation of two variablestabdisp— Display a complete table of precomputed cell valuestabi— Run a Pearson test from immediate cell countstable— Joint frequencies of several variablestabodds— Odds of disease by exposure categorytabstat— Chosen statistics by grouptabulate— One-way frequency tabletebalance— Covariate balance before and after weightingteffects— Propensity-score matchingtempfile— A temporary filetempname— Use a temporary scalar inside local scopetempvar— Compute with a temporary vector in a local scopeteoverlap— Propensity-score overlap summary by treatmenttest— Test a hypothesis about coefficientstestnl— Test an exponentiated coefficient with a nonlinear Wald testtestparm— Jointly test a categorical predictortetrachoric— Estimate a tetrachoric correlation by maximum likelihoodtimer— Time how long code takestnbreg— Fit zero-truncated NB2 regressiontobit— Censored (tobit) regressiontokenize— Split simple whitespace-separated tokenstostring— Numbers to texttpoisson— Fit zero-truncated Poisson regressiontruncreg— Fit a zero-left-truncated normal regressiontsfill— Add rows for missing time pointstsfilter— Hodrick-Prescott trend and cycle decompositiontsline— Time-series line plottsreport— Locate missing time periodstsset— Declare time-series datatssmooth— Centered five-term moving averagettest— Two-sample t testttesti— Run a one-mean t test from summary statisticstwoway— Scatter plot with a fitted linetype— Read lines from a UTF-8 text fileucm— Unobserved components: levelunab— Expand a column-name prefix wildcardunabcmd— Resolve a unique abbreviation among known R choicesunicode— Convert a Latin-1 text file to UTF-8univar— Detailed univariate statisticsunzipfile— Extract a ZIP archive into a chosen temporary directoryuse— Open a Stata datasetuselabel— Make a value-label dictionary tablevar— Unrestricted bivariate VAR(1) by equation OLSvargranger— Test whether x Granger-predicts yvarstable— Eigenvalues of the VAR(1) companion matrixvec— Rank-one vector error-correction modelvecrank— Johansen trace rank test with a restricted constantversion— Version controlviewsource— Inspect the body of a named R functionvif— Variance inflation factorsvioplot— Violin plotwebuse— Load an example dataset from the Stata websitewhich— Where a command comes fromwhile— Repeat while a condition holdswinsor2— Winsorise at the 1st and 99th percentileswntestq— Ljung-Box serial-correlation portmanteau testxcorr— Cross-correlation at positive and negative lagsxi— Create indicator variables omitting the lowest categoryxpose— Transpose the dataxtabond— Dynamic panel (Arellano-Bond)xtcloglog— Random-intercept panel cloglogxtdescribe— How many periods each panel unit hasxtdidregress— Panel difference-in-differences with unit and period fixed effectsxtdpd— One-step difference GMM for a dynamic panelxtdpdsys— System GMM with level and differenced equationsxtgee— gaussian GEE with independence working correlationxtgls— Group-heteroskedastic panel GLS by maximum likelihoodxthtaylor— Hausman-Taylor model with time-varying and invariant endogenous covariatesxtile— Quantile groupsxtivreg— Fixed-effects instrumental-variable regressionxtline— One line plot per panel unitxtlogit— Conditional (fixed-effects) logitxtologit— Random-intercept cumulative-logit modelxtoprobit— Random-intercept cumulative-probit modelxtpcse— Beck-Katz panel-corrected covariancextpoisson— Fixed-effects Poissonxtprobit— Random-intercept panel probitxtrc— Random-coefficient panel model workflowxtreg— Panel fixed effectsxtregar— Random intercept with AR(1) residual correlationxtscc— Driscoll-Kraay covariancextset— Declare panel dataxtsum— Overall and within standard deviationsxttest0— Breusch-Pagan test of individual random effectsxtunitroot— Panel unit-root test: levinlinzinb— Fit a zero-inflated NB2 count modelzip— Fit zero-inflated Poisson with logit zero inflationzipfile— Create a ZIP archive containing a text fileztest— Test a mean using a known population standard deviationztesti— Compare independent means from known-variance summaries
Functions
betaden— Evaluate the beta densitybinomial— Compute an inclusive binomial lower tailbinomialp— Evaluate a binomial probability massbinomialtail— Compute an inclusive binomial upper tailbinormal— Evaluate a correlated bivariate normal probabilitycauchy— Evaluate the Cauchy cumulative probabilitycauchyden— Evaluate the Cauchy densitycauchytail— Evaluate the Cauchy upper-tail probabilityceil— Round upchi2— Evaluate the chi-squared cumulative probabilitychi2den— Evaluate the chi-squared densitychi2tail— Evaluate the chi-squared upper-tail probabilityclock— Text to a date-timecofd— Convert R dates to Stata midnight millisecond codescond— One value if a condition holds, another if notdate— Text to a dateday— Day of the monthdaysinmonth— Get the number of days in each calendar monthdofc— Convert Stata millisecond datetimes to datesdofm— First day of a monthly perioddofq— Convert Stata quarterly codes to quarter-start datesdofy— Construct the first day of each yeardow— Day of the weekdoy— Extract day-of-year numbersexponential— Evaluate the exponential cumulative probabilityexponentialden— Evaluate the exponential densityexponentialtail— Evaluate the exponential upper-tail probabilityF— Evaluate the F cumulative probabilityFden— Evaluate the F densityfirstdayofmonth— Find the first date of each calendar monthfloor— Round downFtail— Evaluate the F upper-tail probabilitygammaden— Evaluate the gamma densitygammap— Evaluate the gamma cumulative probabilitygammaptail— Evaluate the gamma upper-tail probabilityhalfyear— Extract half-year numbershh— Extract the hour from a UTC timestamphypergeometric— Compute an inclusive hypergeometric lower tailhypergeometricp— Evaluate a hypergeometric probability massibeta— Evaluate the beta cumulative probabilityibetatail— Evaluate the beta upper-tail probabilityinlist— Whether x equals any listed valueinrange— Whether x lies within a rangeinvbinomial— Solve a binomial CDF for its success probabilityinvbinomialtail— Solve an inclusive binomial tail for success probabilityinvcauchy— Find the Cauchy 90th percentileinvcauchytail— Find a Cauchy upper-tail critical valueinvchi2— Find the chi-squared 90th percentileinvchi2tail— Find a chi-squared upper-tail critical valueinvexponential— Find the exponential 90th percentileinvexponentialtail— Find a exponential upper-tail critical valueinvF— Find the F 90th percentileinvFtail— Find a F upper-tail critical valueinvgammap— Find the gamma 90th percentileinvgammaptail— Find a gamma upper-tail critical valueinvibeta— Find the beta 90th percentileinvibetatail— Find a beta upper-tail critical valueinvlogistic— Find the logistic 90th percentileinvlogistictail— Find a logistic upper-tail critical valueinvnbinomial— Solve a negative-binomial CDF for success probabilityinvnbinomialtail— Solve a negative-binomial tail for success probabilityinvnchi2— Find a nchi2 noncentral critical valueinvnchi2tail— Find a nchi2 noncentral upper-tail critical valueinvnF— Find a nF noncentral critical valueinvnFtail— Find a nF noncentral upper-tail critical valueinvnibeta— Find a nibeta noncentral critical valueinvnormal— Find the standard normal 90th percentileinvnt— Find a nt noncentral critical valueinvnttail— Find a nt noncentral upper-tail critical valueinvpoisson— Solve a Poisson CDF for its meaninvpoissontail— Solve an inclusive Poisson tail for its meaninvt— Find the Student t 90th percentileinvttail— Find a Student t upper-tail critical valueinvtukeyprob— Find a Tukey simultaneous-comparison critical valueinvweibull— Find the Weibull 90th percentileinvweibullph— Find a PH Weibull percentileinvweibullphtail— Find a PH Weibull upper-tail quantileinvweibulltail— Find a Weibull upper-tail critical valueln— Natural logarithmlncauchyden— Evaluate a Cauchy log densitylnigammaden— Evaluate an inverse-gamma log densitylnmvnormalden— Evaluate a multivariate normal log densitylnnormal— Compute a stable extreme normal log probabilitylnnormalden— Evaluate a normal log density with location and scalelogisticden— Evaluate the logistic densitylogistictail— Evaluate the logistic upper-tail probabilitylower— Lower casemdy— Date from year, month and daymissing— Whether a value is missingmm— Extract the minute from a UTC timestampmofd— Monthly period from a datemonth— Month of a datenbetaden— Evaluate the nibeta noncentral densitynbinomial— Compute an inclusive nbinomial lower tailnbinomialp— Evaluate a nbinomial probability massnbinomialtail— Compute an inclusive nbinomial upper tailnchi2— Evaluate the nchi2 noncentral CDFnchi2den— Evaluate the nchi2 noncentral densitynchi2tail— Evaluate the nchi2 noncentral upper tailnF— Evaluate the nF noncentral CDFnFden— Evaluate the nF noncentral densitynFtail— Evaluate the nF noncentral upper tailnibeta— Evaluate the nibeta noncentral CDFnormal— Evaluate the standard normal cumulative probabilitynormalden— Evaluate the standard normal densitynpnchi2— Solve a noncentral chi-squared probability for noncentralitynpnF— Solve a noncentral F probability for noncentralitynpnt— Solve a noncentral t probability for noncentralitynt— Evaluate the nt noncentral CDFnttail— Evaluate the nt noncentral upper tailpoissonp— Evaluate a poisson probability masspoissontail— Compute an inclusive poisson upper tailqofd— Quarterly period from a datequarter— Extract calendar quarter numbersrbeta— Simulate rbeta variatesrbinomial— Simulate rbinomial variatesrcauchy— Simulate rcauchy variatesrchi2— Simulate rchi2 variatesreal— Text to a numberregexm— Match a regular expressionregexr— Replace the first regular-expression matchregexreplaceall— Replace all numeric runs in textregexs— Extract the matching textrexponential— Simulate rexponential variatesrgamma— Simulate rgamma variatesrhypergeometric— Simulate rhypergeometric variatesrlogistic— Simulate rlogistic variatesrnbinomial— Simulate rnbinomial variatesrnormal— Normal random numbersround— Roundrpoisson— Simulate rpoisson variatesrt— Simulate rt variatesruniform— Uniform random numbersrweibull— Simulate rweibull variatesss— Extract seconds from a UTC timestampstring— Number to textstritrim— Collapse repeated spacesstrlen— Length of a stringstrlower— Lower casestrltrim— Trim leading ASCII spaces onlystrmatch— Match a wildcard patternstrofreal— Format a number as zero-padded textstrpos— Whether a string contains some textstrproper— Title casestrreverse— Reverse plain ASCII textstrrtrim— Trim trailing ASCII spaces onlystrtoname— Turn text into a valid namestrtrim— Remove leading and trailing spacesstrupper— Upper casesubinstr— Replace textsubinword— Replace a complete word in simple ASCII textsubstr— Part of a stringsum— Running sumt— Evaluate the Student t cumulative probabilitytden— Evaluate the Student t densityttail— Evaluate the Student t upper-tail probabilitytukeyprob— Evaluate a studentized-range cumulative probabilityuchar— Create characters from Unicode code pointsupper— Upper caseustrlen— Count Unicode code pointsustrlower— Lowercase Unicode text with an explicit localeustrnormalize— Normalize canonically equivalent Unicode textustrpos— Locate a Unicode substring by code-point positionustrregexm— Unicode-aware regular expression, ignoring caseustrregexra— Replace every ICU regex matchustrregexrf— Replace the first ICU regex matchustrreverse— Reverse Unicode code-point orderustrtrim— Trim Unicode whitespaceustrupper— Uppercase Unicode text with an explicit localeusubstr— Extract one Unicode code point by positionweibull— Evaluate the Weibull cumulative probabilityweibullden— Evaluate the Weibull densityweibullph— Use the proportional-hazards Weibull parameterizationweibullphden— Evaluate a PH Weibull densityweibullphtail— Evaluate a PH Weibull survivor probabilityweibulltail— Evaluate the Weibull upper-tail probabilityword— The first word of a stringwordcount— Number of wordsyear— Year of a dateym— Construct Stata monthly codes from year and monthyq— Construct Stata quarterly codes from year and quarter
Operators
Prefixes
bayesboot— Use Bayesian-bootstrap Dirichlet weights for a slopebootstrap— Bootstrap standard errorscapture— Run code and report success instead of stoppingjackknife— Jackknife standard errorsnestreg— Compare successively added regression blockspermute— Generate a permutation distribution for a regression slopequietly— Run without printingsimulate— Simulate the sampling distribution of a normal sample meansvy— Survey-weighted mean