## Match string for patterns

One can use Regular Expressions (RegEx) in Stata functions when working with string data Finding whether a String matches a Pattern One can use the… Read More »Match string for patterns

One can use Regular Expressions (RegEx) in Stata functions when working with string data Finding whether a String matches a Pattern One can use the… Read More »Match string for patterns

the dstdize commands saves certian matrices and scalars. these can be used to access the results and programmatcially write them to docx, excel, ht,l files… Read More »Using the results of Stata Direct Standardization for display, HTML, putExcel etc

When using person level / individual level data (not aggregated data), quick reference commands are: Age standardization within sex proportion msvi, stdize(ageGrp) stdweight(per) over(sex) per… Read More »Age-Sex Direct Standardization in Stata

The Cochran-Armitage trend test can be used to assess time trends in prevalence of outcomes across repeated cross-sectional surveys. Sample size Calculation in Stata Statistics… Read More »Tests for Trends in Repeated Cross Sectional Surveys

Commands used – xtmixed (older versions, aslo used in Sophia Rabe-hesketh book) or mixed (Stata 15 and newer). By default, xtmixed includes a random intercept… Read More »Multi-level Model in Stata – basic syntax for ‘mixed’

Stata stores and saves date and time as numeric intervals referenced from 1 Jan 1960 (01jan1960 = 0) When the variable is time, one should… Read More »Stata Date – Time calculations

I have written a small Stata program, that does frequency analysis of Likert Scale items and outputs the results as a HTML file The program… Read More »Likert Scale Frequency analysis HTML Output

When you have a scale with Likert scaled responses – example the EU-HLS-Q47 Items: q01-q47; Responses: 1-5 where 5 == Don’t know Calculate number of… Read More »Likert Scale Score Calculation in Stata

A mix of these commands can be really helpful by generating HTML files as outputs. I have started prefering using htput command by Lloren Quint… Read More »HTML Output in Stata

Install dependencies Untar the files in /usr/local/stata15. Install Stata and add your license information. Add the directory to path Log out and re-login to initialize… Read More »Stata 15 installation on Ubuntu 18.04