Announcement
Collapse
No announcement yet.
250 results in 0.0091 seconds.
loop
x
You can also choose from the popular tags.

Using global variables within forvalue loops
I am trying to design a for loop that can be easily adapted for the input values but cannot work out a way to use global variables within my for loop....
 4 posts

Li Huang started a topic Create list of variables w/ different redaction patterns & dropping specific redacted variables based on other nonredacted varsin GeneralCreate list of variables w/ different redaction patterns & dropping specific redacted variables based on other nonredacted vars
Hello,
disclaimer: dataset contains PHI therefore I have recreated a replica with substituted variable names and values that are functionally...
 5 posts

Invalid syntax in a loop (r198)
Dear all,
I had a problem when doing a loop, the commands are as follows:
local max_ad 2
forvalues andate=1/`max_ad'{...
 2 posts

Error last estimates not found.
Hello
I am trying to run a regression among 220 firms from 19982018 to predict a yearly beta value. However, when I try to run the code I first...
 4 posts

April Yu started a topic How to create a loop for doing regression with multiple variables and storing each estimate with a sequential labelin GeneralHow to create a loop for doing regression with multiple variables and storing each estimate with a sequential label
Hi I'm new to Stata and have a question about using foreach for regression.
I have A as a dependent variable, B as an independent variable,...
 2 posts

Combinations of variables
Hi everyone,
I am a new Stata user and have a problem with commands.
I am working with a dataset of deaths caused by natural disasters (floods,...Last edited by Fernando Gonzalez; 18 Jun 2019, 11:50.
 3 posts

difficulty with forvalues/foreach naming
hi all, I'm trying to generate a new set of variables and struggling with the naming 
I have a variable of "state" that has a...
 4 posts

How to tell if all items in a group are equal?
The data below is a simplified example to illustrate the problem I am working on. Basically, I am trying to figure out the number of families where all...
 3 posts

Why use rolling regression for FamaMacbeth?
Hello, I posted this question on Stack Overflow but I was recommended by Nick Cox to post it here instead. The post on Stack Overflow can be found he...Last edited by Juana Fusteria; 11 Jun 2019, 04:12.
 1 post
 1 like

Loop fails to find local macro
Hi there,
I have an issue with one local macro within a fovalues loop.
The main purpose of this code is to look for xlsx files...
 6 posts

Calculating across observations or across variables in panel data
Dear Statalist,
I am quiet new to Stata (Version 14 SE on Windows 10) and I am facing the following Problem: I have unbalanced quarterly...
 5 posts

rename variables with foreach (getting rid of prefix)
Dear all,
I have a data set which contains many variables e.g. with a country prefix: "mexiko_variablename", I would like to rename...
 2 posts

Loop over a huge number of files
I am trying to loop over a large number of files (360,000 files) to convert them from .csv to .dta files (the idea is then to append the data files later)....Last edited by S. IAAIA; 17 May 2019, 10:02.
 9 posts

Stata correct identification of coefficients after regression (loop)
Dear all,
I am currently working on a dataset (with information on time allocated from people to many different activities, collected with...Last edited by Claire Essy; 05 May 2019, 11:04.
 3 posts