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
Understanding Cataract Prevalence and Operated variables in RAAB
There are various ways that cataract can be defined when analysing data from RAAB surveys. Here, I review the RAAB Analysis R scripts to understand how it is being done in the autogenerated tables. Understanding the case_when syntax This syntax is used very commonly for creating new variables based on
August 9, 2024
Survival Analysis in Stata
Cheat-sheet DETAILS A Key concept in survival analysis is ANALYSIS TIME. All analyses are performed in terms of time since becoming at risk, called analysis time. Subjects are exposed at t = time = 0 and later fail. Observations with t = time <= 0 are ignored because information before
July 22, 2024
Some resources for Stata Graphs
Apart from the routine, you can create some interesting graphs
June 29, 2024
LASSO in Stata
Crossvaldiation By default, stata will select model with highest lambda. By default, stata fits up to 100 models with varying lambdas. The model with largest out of sample r-square and minimum CV mean prediction error gets selected by cross-validation LASSO commands SSC Addons based methods Stabdard Lasso estimation commands Lasso
May 24, 2024
Compact Results of Logistic Regression in Stata using ‘estout’ – ‘logisticresults’
After running a logistic regression in Stata, for inclusion in classical tables, one needs the Odds ratios and 95% confidence intervals. I have developed a small code snippet for getting reasonably compact unstyled results that can be easily copy-pasted in word or excel. This actts as a thin wrapper for
February 20, 2024
Easily get gender wise results of binary outcomes after survey data analysis in Stata
Problem Statement: You have a survey data and you wish to summarize your prevalence by gender Prerequisites: Stata Code Result You will get the outcome variable name in first column, male total, male %(95% CI), female total, female % (95%CI), total number, total % (95% CI). This can be copied
February 16, 2024
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
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
Factor Congurence Calculation in Stata
This is a code I had written for factor congruence analysis based on the formula that I was provided. It calculates the congruence for multiple datasets of results of factor analysis (again - not original data but results). Each db being an excel file with two sheets - factor analysis
April 9, 2019
EpiData to Stata
EpiData is commonly used by researchers all over the world for data entry. Stata is used commonly for data analysis. EpiData can export to Stata directly with labels preserved. However there are issues with the width of the variable and value labels Following code will help ! This should take
April 9, 2019