How do I generate a new variable which gives me the sum of two variables (msf_n_4weeks and msm_n_4weeks) but only assigns a missing value if BOTH of t ...
How do I generate a new variable which gives me the sum of two variables (msf_n_4weeks and msm_n_4weeks) but only assigns a missing value if BOTH of t ...
I am relatively new to Stata and I currently have a Reddit dataset in cross-sectional format with each row representing a given Reddit post by a usern ...
I ran into a challenge today and I hope to get some help. I want to merge 2 data sets. Dataset1 contains the member roster with 3 variables, the batch ...
stata experts, I have been trying to find a way to store marginal estimations, including the p value and confidence interval. Below is the code I ha ...
I would like to append all .dta data in a directory. The datasets have four common string characters "GTAH" in their names. I tried creating a list of ...
I am getting error in Stata by using the following commands: but this is not giving me the result. ...
I have a dataset in Stata where one observation is spread out over multiple rows like the table below. The variables are string except for the id, and ...
I have run two regressions on similar but different data sets and regressors the results of which I want to report next to each other for comparabilit ...
I want to esttab specific variable in one row Use data in Stata What I need is mpg and foreign result in the same line. In my data the variable ...
I am trying to find a vectorized, general way to accomplish a task in R for which I typically use Stata. I have a list of variables which have a commo ...
I am looking to replace a time stamp from 00:00:00 to 23:59:59. Stata still shows the timestamp as 00:00:00 The storage type is double. It was cre ...
My dataset looks like this: I want to generate variables which measure the standard deviation of a variable for a window 90 days before an entry. F ...
New R user here, coming from Stata. Most of my work consists of running several regression models with different combinations of dependent and indepen ...
I am new to stata. I am trying to write code in stata that would graph Idaho's crime rate from 2016 - 2021. I'm using data from the FBI: (https://cde. ...
I currently struggle to apply the reverse option to my ttest. Here is a toy example: The following works: Note: works. After reading the es ...
I am trying to replicate findings from a particular study. The study uses the xtabond command in Stata to run an Arellano-Bond estimator with lags of ...
I have a dataset in Stata with information on whether or not a participant has experienced a specific side effect. The dataset contains about 900 part ...
This question was migrated from Stack Overflow because it can be answered on C ...
I have two datasets: Panel - years from 2010 to 2020 Ranges for each firm (one or many) when they took a loan - also the range indicates the loa ...
I ran the did_imputation command in Stata and got faced the ms_get_version error. I follow a discussion from Statalist to run the code below to fix: ...