Using STATA 15.1 Windows 10
Hi All, firsttime poster.
I am attempting to replace a dummy variable (y_dummy) equal to 1 when...
Announcement
Collapse
No announcement yet.
195 results in 0.0142 seconds.
loop
x
You can also choose from the popular tags.

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
 3 posts

Store regression coefficients from looping over multiple y variables
Hi everyone, I am new to the forum and hoping to get some help on storing regression results.
I would like to store the regression coefficients...
 4 posts

Mateo Barraza started a topic Storing means of a categorical variable and using them as reference linein GeneralStoring means of a categorical variable and using them as reference line
Greetings.
I have a dataset containing individual grades and indexes by institution and reference group (some institutions can belong to...Last edited by Mateo Barraza; 26 Aug 2018, 00:25.
 2 posts

leila salarpour started a topic changing value of observations to cumulative version over time for each idin Generalchanging value of observations to cumulative version over time for each id
Hi Guys,
I have a panel of frequencies looking like
# ID Year Freq
1 1 2000 2
2 1 2001 3
3 1 2002 2
4 2 2000 0...Last edited by leila salarpour; 11 Aug 2018, 06:37.
 4 posts

Computing bilateral flow using function
Dear all,
This is not a statistical question (I apologize) but one for a function.
I have data for origin and destination (data...
 7 posts

Marvin Hanisch started a topic Loop for creating number of prior events within a specific time framein GeneralLoop for creating number of prior events within a specific time frame
Dear all,
I am trying calculate the number of alliances that a given firm formed with other partners five years before forming the focal...
 7 posts

Creating different Event Windows, conditional sum of columns
I want to calculate cumulative returns for several event horizons, in the following data I need to create a sum of xstret (excess returns).
...
 3 posts

For Loop Syntax Error  Subsetting Data
Hello,
I have two datasets. I have a Maindata which I would like to split into around 40 datasets based on a criteria in a separate dataset....Last edited by Minnie Smith; 15 Jul 2018, 11:38.
 3 posts

For Loop Syntax Error
Hello,
I am trying to use a basic for loop but keep getting the error 'Invalid Syntax' which I cannot figure out. The variable id has been...
 3 posts

Foreach loop  egen function
At present, I need to generate a new variable for each value in the variable called "setting" (Int 112), which would be the sum of those values...Last edited by Tim Chambers NZ; 18 Jun 2018, 16:22.
 3 posts

Nested foreach i of num loops and output files
Hi STATA forums,
I have a somewhat simple nested foreach loop. It is importing JSON files, reformatting them, and attempting to save as...Last edited by Jeffery Sauer; 15 Jun 2018, 16:01.
 3 posts

Gerwin Pieter Colje started a topic Copy observation to blank observations within specified time framein GeneralCopy observation to blank observations within specified time frame
Dear all,
I am looking for a solution to copy an announcement date to all dates within a specified time frame. This time frame ranges from...
 2 posts

Loop or tool to replace missing components of an aggregate
I have an aggregate X that consists of components A + B + C + ...
Suppose now that C is missing. If all others are available, I can use X  A ...
 3 posts

Variable order loop
Hi all, I have a data set with 280 variables. All but ~35 of them are repeats of question of variables ordered by event. The event is numbered (event1,...
 4 posts

loop with "recursive" variable definition
Hi everyone,
I'm quite new to Stata so apologies if this question is "basic".
I have a panel with the following variables:...
 5 posts