Skip to main content
Skip to footer
Epidemiology & Technology
Home
Stata
Containers
Docker
Proxmox
Traefik
Ubuntu
Manjaro
Windows
Mac
WordPress
Welcome
About Me
Publications
Home
Stata
Containers
Docker
Proxmox
Traefik
Ubuntu
Manjaro
Windows
Mac
WordPress
Welcome
About Me
Publications
Search site
Search
×
Blog Archive
Stata Code for generating corneal opacity outcomes from RAAB 6 surveys
Corneal Opacity Related Outcomes There are four sets of variables Stata Code The above Stata code can be used by anyone under a CC-BY-SA license.
January 12, 2024
Stata Graph Colors
Install the packages contributed by Ben Jann: here and here in the Stata Journal. Initialize and set the preferred graph schemes. Here I am setting plain background with dotted grid and legend without any box at 2 o-clock inside graph region. Detailed help for grstyle is there. Assigning Colors Examples
August 8, 2023
95% Confidence Intervals of categorical outcome by categories of a Risk Factor in Survey Data
Use the following program to generate the summary 95% confidence intervals Usage RESULTS You get the N for each category of race, and the Percent and 95% CI for each category of BMI. The First row depicts the order of the results
August 6, 2023
Easy Estimates Table after Logistic Regression
We need to address several concerns when running logistic regression in Stata. For such situation, the fantastic esttab and estout packages are incredibly useful. An example follows One thing to note, the Variables are not displayed, only their categories. It may prove to be problematic if many variables use same
August 6, 2023
RAAB6 Surveys Stata Commands for Cataract Surgical Outcomes
The WHO Eye Care Indicator Menu has prescribed many core indicators. The Core Indicator 6 is Cataract surgical outcome (visual acuity) in the domain of Output – Eye Care Service Quality Definition: Percentage of eyes with: Estimation of these indicators can be accomplished using the below Stata code I have
August 6, 2023
Stata Code for eCSC and CSC calculations
WHO has identified WHO Effective Cataract Surgical Coverage (eCSC) as a key indicator for monitring Universal Eye Health. LINK There is a slight change from the prior formulae used for eCSC in papers by Ramke et al and the one published by Keel et al. Further, the original CSC estimation
March 14, 2023
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 ustrregexm function. You can remember it as an abbreviation for "Unicode String Regular Expression Match" = UStrRegExM The above function will be TRUE if the
May 29, 2021
Using the results of Stata Direct Standardization for display, HTML, putExcel etc
The dstdize command saves certain matrices and scalars. these can be used to access the results and programmatically write them to docx, excel, html files etc Example Usage
April 23, 2021
Age-Sex Direct Standardization in Stata
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 = percent of population in age group calculated separately for males and femalesdstdize msvi p ageGrp if sex==1, by(sex) using(stdPop) print AND dstdize msvi p
April 19, 2021
Tests for Trends in Repeated Cross Sectional Surveys
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 > Power and Sample Size > Outcome > Binary > Linear Trend in proportions in Jx2 table OR power trend Examples follow Sample size for
March 3, 2021