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 ...
Search
×
Blog Archive
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
Multi-level Model in Stata – basic syntax for ‘mixed’
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 Model Specification Outcome variableFixed Effects part of the model- double pipe - ||Random part of the modelCluster identfier - example subject id within whom the
August 8, 2020
Stata Date – Time calculations
Stata stores and saves date and time as numeric intervals referenced from 1 Jan 1960 (01jan1960 = 0) When the variable is time, one should use double variable type When variable is date, float is OK Stata help The above command is your best resource! Stata Internal Format (SIF) and
August 8, 2020