Hi
I want to run the below code, but can't get it right.
As I have a panel data with many IDs and months. I want to run the univariate...
Announcement
Collapse
No announcement yet.
191 results in 0.0133 seconds.
foreach
x
You can also choose from the popular tags.

 8 posts

GARCH regressions for panels using foreach
Hi,
1. I want to estimate my risk measures using bivariate diagonal GARCH (1,1) model (DVECH) for each of my 360 panels in the data(from...Last edited by Aamina Khurraa; 04 Nov 2019, 10:52.
 2 posts

Mahmoodur Rahman started a topic expand 2x2 table by merging additional variables as columns with tabout or putexcelin Generalexpand 2x2 table by merging additional variables as columns with tabout or putexcel
Hi,
I have a data that looks like this:
Code:* Example generated by dataex. To install: ssc install dataex clear
 3 posts

Listing a series of 10 max and 10 min values of a variable in stata
Hi
I want to extract a list of my panel IDs named as "FI" and months/years named as "Time_period" having the 10 maximum...
 7 posts

Help with Looping
Good day, Statalist,
Please, I am carrying out an analysis for 5 waves of a survey data. Hence I would want to replicate the commands for...
 3 posts

sam khanna started a topic Running multiple regression models on different combinations of explanatory variablesin GeneralRunning multiple regression models on different combinations of explanatory variables
Hi,
Before I post my question, I would like to mention that I already looked through the forums here on using for loops to run multiple regression...
 6 posts

Weighted returns for the entire sector(all panels) in a panel study
Hi
I am stuck in understanding how to generate the sector_return (SR) using the average of returns (R) weighted by the Lagged Assets (LAit)...
 3 posts

Aditi Roy started a topic random treatment,50 times loop and store the estimate with p value for the variable of interest (POST) and display.in Generalrandom treatment,50 times loop and store the estimate with p value for the variable of interest (POST) and display.
Hi,
I want to randomly assign treatment and run the same regression in the loop for 50 times and then I want to see how many times my variable...
 4 posts

Christophre Dennen started a topic Using a nested foreach loop to merge and then append multiple files from multiple folders into one dataset.in GeneralUsing a nested foreach loop to merge and then append multiple files from multiple folders into one dataset.
Essentially, I have a few thousand text files, for which I have a nested foreach loop to import them to .dta files. Here is that code:
foreach...
 15 posts

Writing nested foreach loop to convert many .txt files to .dta
I'm trying to write a foreach loop to convert a few hundred text files, divided up into many folders. So far I have this:
foreach...
 3 posts

looping isuues
Hi Everyone,
I have a dataset something like:
A_count B_count S_count.......Z_count A_percentage B_percentage S_percentage............Z_percentage...Last edited by Sitaram Sahoo; 29 Aug 2019, 08:27.
 15 posts

adding 100 rows in a matrix from different 100 matrices
Hello,
I am trying to make a column matrix (100X1) using different 100 matrices? What is the best possible way to do it?
If I write...
 5 posts

MHTEXP*Theorem 3.1 Adjusted Values Extraction
Hi everyone,
I have been trying to create a matrix of List's MHT adjusted pvalues that I get after running the mhtexp command but I can't...
 1 post

Renaming multiple variables in a loop
Hi,
How can I rename multiple variables without having to manually rename every single one of them using a loop? I am using the following...
 5 posts

Fabio Martinenghi started a topic Loop going through distinct values of variable1 and replacing distinct string in variable2 per each iterationin GeneralLoop going through distinct values of variable1 and replacing distinct string in variable2 per each iteration
Hi all,
I have this kind of reproducible code:
Code:clear set obs 10 gen str names = "" gen num = _n
 3 posts