What does "Save All" exactly do in Stata DO-files?
hi, can someone pls explain what "Save All" exactly do in Stata DO-files? After updating an existing DO-file I wanted to save it as a new document, but instead of Save As I clicked on Save All...
View Articlediffering results for proportions using subpop vs 'over' with mi estimate...
Hi Statalisters - I am using multiple imputation for HIV status and have just identified some strange findings across what I had anticipated to be two different ways of calculating the same statistics....
View ArticleRESHAPE in STATA
Hi Statalist! My data is presented like this: COUNTRY PARTNER YR2001 YR2002 YR2003 A...................... B ...........1............... 2.............3 B ......................A..............
View ArticleSpecifying and calling a mata function inside stata loop
Dear Statalisters, I want to call a mata function inside a stata-loop since calling mata inside the stata loop will not be feasible. I understand that I have to define the mata function outside the...
View Articlereplacing observation with observation of another variable in two different...
Hi I did the first survey but i realize that there were many missing values. I have therefore conducted the second survey so that i can fill in the missing value. How do I replace observation in the...
View ArticleHelp: how to identify nearest neighbor for one variable and calculate the...
Dear all, I have a problem to calculate the smallest difference between observations in each group in one variable. Could you please help me to calculate the distance between observation and its...
View Articletabout command
Hello, I would like to monitor a standardized list of around 200 health sector related variables across different time points. I prepared my data for that purpose and wanted to tabout the full list of...
View ArticleForeach loop for a series of t-tests
I want to run a series of t-tests in a foreach loop. I want the t-tests to be performed on each sub-population in a variable called Category. Category is a string variable with about 20 different...
View ArticleCross-Sectional Dependence
Hi, I am running a panel data model with fixed effects (N=208, T=14). This is basically the code: *Set Data to Panel* encode Land, gen(Land1) xtset Land1 Year *Running Models* eststo, title("FE"):...
View Articlehow could I redefine label?
I have to define label Code: label define defcat2 11 "0-19 (1970-74)" 12 "20-39 (1970-74)" 13 "40-59 (1970-74)" 14 "60+ (1970-74)" 21 "0-19 (1975-79)" 22 " > 20-39 (1975-79)" 23 "40-59 (1975-79)" 24...
View ArticleDifferences between Stata teffects psmatch and nnmatch?
Hi, I am using Stata 13 to analyse some observational data and a treatment. I came across an abundance of possible ways to estimate treatment effects with Stata. Let me just show you two options below...
View Articleconverting vertical lines and slash
Hello all, I am new to stata and am trying to create a new variables (Red_4, Red_11, Red_14 and Red_23 for example) by extracting observations (when observation = 4, 11, 14 or 23 for exaple) from a...
View Articlehow to retrieve the 95% CI following a binary by 3 category interaction...
Hi Statlisters, I ran the below code on the data (example given below) Code: logistic status CYP2A_D#smoke3_24 ethL and got the output...
View ArticleRenaming/replacing label names
I am working across multiple datasets and have a list of about thirty labels that need to be renamed to slightly different label names (e.g. yesno to yes_no_dnk_nr, edul to school_list, roofl to...
View ArticleCreating a Date Variable
I am relatively new to Stata and would appreciate some help. I have a string called "reading_datetime" which contains a date and time in the following format yyyy-mm-dd hh:mm:ss for example 2012-02-10...
View ArticleFactor-Augmented Vector Regression (FAVAR) models
Dear users, I am going to investigate the relationship between monetary policy and economic activity. It is suggested that Factor-Augmented Vector Regression (FAVAR) models is sophisticated for this...
View ArticleForest Plot based on individual participant data by subgroups (ipdover)
I am using the ipdover function to plot individual participant data by subgroup analyses. My estimation command is a mixed effects linear regression: ipdover, over(study) over(initial_pain): mixed...
View Articlesaving results issue
Hi, I wonder if someone can help me. I run the program and the results are not saved in the specified file. I have no error message when run the program but the output file is not updating... any idea...
View ArticleWhat does "Save All" exactly do in Stata DO-files?
hi, can someone pls explain what "Save All" exactly do in Stata do-files? After updating an existing do-file I wanted to save it as a new document, but instead of "Save As" I clicked on "Save All"...
View ArticleMargins command output interpretation
How to interpret the output of margins command and marginsplot. We are trying to examine quadratic moderation for a probit model. Any leads in this regard will be of great help.
View Article