## Nested Loop in Stata

Nested loops, double loop, multiple loop and loop within a loop, all refer to the same thing. Nested loops are a good way to tackle multiple tasks systematically. To work with Nested loops, we would need to have an understanding of both the ‘forvalues’ loop and the ‘foreach’ loop. Nested loops involve having one loop […]

## Categorical Variable Regression in Stata Part1

In regression analysis, quantifiable data often steals the spotlight. Yet, there are instances where qualitative or categorical variables like gender, ethnicity, age groups, or even something as simple as car colours play a crucial role. How do we seamlessly integrate these categorical variables into our statistical models? Take, for example, a study examining how gender

## Changing Working Directory in Stata

We are going to look into how to change the working directory or your working folder in Stata. First, we need to understand what a working directory or a working folder is. For defining purposes, it is the current folder where our data files, do files, and example files are present. It is the directory

## Create or Delete a Folder and Delete a file in Stata

In this article, we are going to learn how to Delete a File, Create a Folder and Delete a Folder in Stata. We do have to work with files that are in our hard drives. For deleting file on a hard drive, we have two commands. The “erase” command can be used if we are

## Copy file from one folder to another using Stata

To copy a file from one directory to another or from one folder to another in Stata, we use the “copy” command. If we want to copy “image.png” from Folder1 to Folder2, then we will use the following command copy “D:\copy file\folder1\image.png” “D:\copy file\folder2\” Once executed, this command would copy the image in the Folder