Dear Statalist,
We have collected annual data on minorities in several countries for 25 years. Now I would like to import all data into Stata...
Announcement
Collapse
No announcement yet.
209 results in 0.0103 seconds.
loop
x
You can also choose from the popular tags.

Tom Konzack started a topic Excel files: Merge worksheets within Excel files and append Excel files with a loopin GeneralExcel files: Merge worksheets within Excel files and append Excel files with a loop
Last edited by Tom Konzack; 09 Jan 2019, 10:28.
 11 posts

Aditi Roy started a topic difference in difference on a cross sectional dataset by group averages.in Generaldifference in difference on a cross sectional dataset by group averages.
Hi,
I want to implement differenceindifference on a crosssectional dataset by group averages ( eg: birth cohorts in states) as shown in...
 7 posts

Jim Steiner started a topic Foreach vs. Forvalues when using char() function to remove special characters in a string variablein GeneralForeach vs. Forvalues when using char() function to remove special characters in a string variable
Hello all,
Using Stata 15.1/IC
I need to submit a bulk file with a string variable ("NAME" variable in this example)...
 8 posts

Loop for calculating OR in 2x2 tables (cci)
Hi,
I am doing a systematic review and I am comparing ORs. For most of the studies, I can only extract prevalence, calculate numbers to insert...Last edited by Katrine Lawaetz; 21 Dec 2018, 04:52.
 3 posts

Alexander Rodriguez started a topic Using local macro to create 'blocks' of variables to be used in multivariable regression analysesin GeneralUsing local macro to create 'blocks' of variables to be used in multivariable regression analyses
Dear Statalisters,
There have been several parallel threads on using local macros to create lists of variables when running repetitive regressions,...
 5 posts

How to drop random years from panel data?
I have a panel data set, consisting of 125 countries, 36 years. I want to run an IV regression multible times and randomly drop 5 (of the 36 years) each...
 11 posts

Overlappingrolling window
Dear Statalisters,
I am running into an issue with rolling windows and I need your kind help with this. I am trying to calculate the exponentially...
 9 posts

How to generate 6 lagged variables for thousands of underlying variables?
Hi all,
I'm new on here. I know some bits and pieces about STATA so am not completely green. The issue I have at the moment is:
...
 12 posts

create loop for discrete variable, panel data
Dear all,
I am new to stata and I can't figure out how to create a loop for the following code. This problem seems to be recurring in various forms...
 2 posts

Conditional dynamic text using putdocx
Hi everyone,
I'm trying to massproduce reports based on statistical output from using the putdocx command. Is there a way to use the putdocx...Last edited by June Parr; 10 Nov 2018, 05:23.
 3 posts

Generate variabile from date to date
Hello!
I'm working with a panel data, I have daily observations of prices from 01/01/2002 to 31/12/2007 for 35 companies. How can I create a new...
 1 post

Using filelist to import and append several tsv files
I would like to import and then append a multitude of tsv files which are located within different subfolders of my main folder. I am trying to replicate...
 2 posts

Solving nonlinear equations within a loop in Stata
Cross posted on Stack Overflow.
Hi I am trying to solve 3 nonlinear equations using nl command in Stata within a loop. The working program...Last edited by Sher Afghan Asad; 25 Oct 2018, 12:14.
 4 posts

Creating a Counter
Hi,
This may seem trivial but I am trying to create a counter of the following nature:
We have data on date, dummy for a capital...
 3 posts

Jim Steiner started a topic Replace dummy variable value when a variable has a numeric value somewhere in the list of all of another variable's valuesin GeneralReplace dummy variable value when a variable has a numeric value somewhere in the list of all of another variable's values
Using STATA 15.1 Windows 10
Hi All, firsttime poster.
I am attempting to replace a dummy variable (y_dummy) equal to 1 when...
 3 posts