Using the results of Stata Direct Standardization for display, HTML, putExcel etc
April 23, 2021The dstdize command saves certain matrices and scalars. these can be used to access the results and programmatically write them…Age-Sex Direct Standardization in Stata
April 19, 2021When using person level / individual level data (not aggregated data), quick reference commands are: Age standardization within sex proportion…Tests for Trends in Repeated Cross Sectional Surveys
March 3, 2021The Cochran-Armitage trend test can be used to assess time trends in prevalence of outcomes across repeated cross-sectional surveys. Sample…Multi-level Model in Stata – basic syntax for ‘mixed’
August 8, 2020Commands used - xtmixed (older versions, aslo used in Sophia Rabe-hesketh book) or mixed (Stata 15 and newer). By default,…Stata Date – Time calculations
August 8, 2020Stata stores and saves date and time as numeric intervals referenced from 1 Jan 1960 (01jan1960 = 0) When the…Likert Scale Frequency analysis HTML Output
July 1, 2020I have written a small Stata program, that does frequency analysis of Likert Scale items and outputs the results as…Likert Scale Score Calculation in Stata
June 30, 2020When you have a scale with Likert scaled responses - example the EU-HLS-Q47 Items: q01-q47; Responses: 1-5 where 5 ==…HTML Output in Stata
March 25, 2020A mix of these commands can be really helpful by generating HTML files as outputs. I have started prefering using…Stata 15 installation on Ubuntu 18.04
October 17, 2019Install dependencies Untar the files in /usr/local/stata15. Install Stata and add your license information. Add the directory to path Log…Factor Congurence Calculation in Stata
April 9, 2019This is a code I had written for factor congruence analysis based on the formula that I was provided. It…