{"id":2068,"date":"2026-01-23T10:30:00","date_gmt":"2026-01-23T07:30:00","guid":{"rendered":"https:\/\/resourcefulscholarshub.com\/?p=2068"},"modified":"2026-01-22T19:34:48","modified_gmt":"2026-01-22T16:34:48","slug":"data-entry-in-stata","status":"publish","type":"post","link":"https:\/\/resourcefulscholarshub.com\/?p=2068","title":{"rendered":"Stata Tutorial #2: Data Entry in Stata"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">How do you enter data into Stata? In this post, I will discuss and illustrate three main methods of data entry in Stata: the manual entry method, the import method, and the copy and paste method.<\/p>\n\n\n\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-296c5cf6      \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tTable Of Contents\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap \">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#manual-entry\" class=\"uagb-toc-link__trigger\">Manual entry<\/a><li class=\"uagb-toc__list\"><a href=\"#importing-data-from-other-programs-excel-spss-and-text-data\" class=\"uagb-toc-link__trigger\">Importing data from other programs (Excel, SPSS, and text data)<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#1-importing-an-excel-file\" class=\"uagb-toc-link__trigger\">1. Importing an Excel file<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#2-importing-an-spss-file\" class=\"uagb-toc-link__trigger\">2. Importing an SPSS file<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#3-importing-text-data\" class=\"uagb-toc-link__trigger\">3. Importing text data<\/a><\/li><\/ul><\/li><li class=\"uagb-toc__list\"><a href=\"#copying-and-pasting-data\" class=\"uagb-toc-link__trigger\">Copying and pasting data<\/a><li class=\"uagb-toc__list\"><a href=\"#understanding-types-of-data-in-stata\" class=\"uagb-toc-link__trigger\">Understanding types of data in Stata<\/a><\/ul><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\n\n<h2 class=\"wp-block-heading\">Manual entry<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can enter data manually into Stata by using the Data Editor (Edit) tool.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Manual entry of data into Stata is only possible for small datasets, as it can be time-consuming and prone to errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To manually enter data into Stata, open Stata, go to Stata Toolbar, then click on Data Editor (Edit).<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-15a67004 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Manual1.png\" alt=\"\" class=\"uag-image-2069\" width=\"616\" height=\"406\" title=\"Manual1\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This will open the Stata spreadsheet. The rows in the spreadsheet represent individual observations (for instance, individual respondents) whereas the columns represent the variables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Type in the data you want to enter starting with the first blank box.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you first type in the data, the columns headers will be named var, for instance, var1 representing variable 1, var2 representing variable 2 etc.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-914cd9dd wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Manual2.png\" alt=\"\" class=\"uag-image-2070\" width=\"655\" height=\"513\" title=\"Manual2\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">You should replace these default variable names with the actual variable names in your dataset, for instance, age, gender, education etc.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-11ccb3c7 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Manual3.png\" alt=\"\" class=\"uag-image-2071\" width=\"526\" height=\"300\" title=\"Manual3\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Once you are done inputting data into Stata, save the dataset using an appropriate name and in the appropriate location.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-40ae9311 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Manual4.png\" alt=\"\" class=\"uag-image-2072\" width=\"614\" height=\"352\" title=\"Manual4\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Stata data files are saved as <em>.dta<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Importing data from other programs (Excel, SPSS, and text data)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The manual data entry method is time-consuming, especially for large datasets, and is also prone to errors. It is therefore not recommended for large datasets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The alternative method of data entry in Stata is importing the data from other programs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The programs supported by Stata include Microsoft Excel spreadsheets, Text data (different formats), SPSS data, SAS data, JDBC data source, ODBC data source, among others.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the following sections, I will illustrate how to import data from Excel spreadsheets, from an SPSS data file, and how to import text data.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Importing an Excel file<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To import data from an Excel spreadsheet, open Stata, click the File menu, and then click the import option.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-b244c9b2 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Excel0.png\" alt=\"\" class=\"uag-image-2073\" width=\"2394\" height=\"1356\" title=\"Excel0\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">From the options provided, select \u201cExcel spreadsheet\u201d<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-4a9f67a6 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Excel1.png\" alt=\"\" class=\"uag-image-2074\" width=\"427\" height=\"416\" title=\"Excel1\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The \u201cimport Excel files\u201d dialogue box will open. Click on the browse button to select the Excel file which contains the data you want to import.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-dc27f86a wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Excel2.png\" alt=\"\" class=\"uag-image-2075\" width=\"2792\" height=\"1734\" title=\"Excel2\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Select the file and click \u201cOpen\u201d.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-80a818b9 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Excel3.png\" alt=\"\" class=\"uag-image-2076\" width=\"446\" height=\"287\" title=\"Excel3\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If the file has more than one worksheet, specify the worksheet that you want to import the data from.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-b7301e6d wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Excel4.png\" alt=\"\" class=\"uag-image-2077\" width=\"477\" height=\"284\" title=\"Excel4\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure to check the option \u201cImport first row as variable names.\u201d This will ensure that the first row in the Stata file contains the variable names as they appear in the Excel spreadsheet. Then click OK.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-56ebcf2e wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Excel5.png\" alt=\"\" class=\"uag-image-2078\" width=\"2792\" height=\"1676\" title=\"Excel5\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The data will now be imported into Stata. To view the data, click on Data Editor (Browse).<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-eb58ffd6 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Excel6.png\" alt=\"\" class=\"uag-image-2079\" width=\"2786\" height=\"1668\" title=\"Excel6\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Command syntax for importing an Excel file<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The command syntax for importing the Excel file is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>import excel \u201cfile name.xlsx\u201d, sheet(\u201csheet name\u201d) firstrow.<\/em> The option <em>firstrow<\/em> tells Stata to treat the first row as the variable names<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Importing an SPSS file<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To import data from an Excel spreadsheet, open Stata, click the File menu, and then click the import option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From the options provided, select \u201cSPSS data\u201d<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-b1c3f48a wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/SPSS1.png\" alt=\"\" class=\"uag-image-2080\" width=\"503\" height=\"312\" title=\"SPSS1\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The \u201cimport SPSS files\u201d dialogue box will open. Click on the browse button to select the SPSS file which contains the data you want to import.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-bf9dda28 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/SPSS2.png\" alt=\"\" class=\"uag-image-2081\" width=\"614\" height=\"378\" title=\"SPSS2\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Select the file and click \u201cOpen\u201d.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-ee38b066 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/SPSS3.png\" alt=\"\" class=\"uag-image-2082\" width=\"522\" height=\"323\" title=\"SPSS3\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Then click OK.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-2d389072 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/SPSS4.png\" alt=\"\" class=\"uag-image-2083\" width=\"2780\" height=\"1662\" title=\"SPSS4\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The data will now be imported into Stata. To view the data, click on Data Editor (Browse).<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-b4fce72c wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/SPSS5.png\" alt=\"\" class=\"uag-image-2084\" width=\"2792\" height=\"1670\" title=\"SPSS5\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Command syntax for importing an SPSS file<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The command syntax for importing an SPSS file is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>import spss using \u201cfilename\u201d<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Importing text data<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Stata also allows you to import data that is saved in text format, for instance, .txt or .csv.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To import text data into Stata, open Stata, click the File menu, and then click the import option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From the options provided, select \u201cText data.\u201d<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-b630b9ea wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Text-data1.png\" alt=\"\" class=\"uag-image-2085\" width=\"2136\" height=\"1561\" title=\"Text data1,,\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The \u201cimport delimited text data\u201d dialogue box will open. Click on the browse button to select the file to import.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-1948453c wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Text-data2.png\" alt=\"\" class=\"uag-image-2086\" width=\"571\" height=\"387\" title=\"Text data2\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Then click OK.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-4bb5942f wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Text-data3.png\" alt=\"\" class=\"uag-image-2087\" width=\"2194\" height=\"1440\" title=\"Text data3\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The data will now be imported into Stata. To view the data, click on Data Editor (Browse).<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-e588ecaa wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Text-data4.png\" alt=\"\" class=\"uag-image-2088\" width=\"1854\" height=\"1450\" title=\"Text data4\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Command syntax for importing an SPSS file<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The command syntax for importing an SPSS file is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>import delimited \u201cfilename.\u201d<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Copying and pasting data<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Besides manual data entry and importing data into Stata, you can also copy data from a different program and paste it into Stata.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For demonstration, I will use data saved in Excel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the Excel file with the data and copy the data you would like to use.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-371dab1d wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Copypaste1.png\" alt=\"\" class=\"uag-image-2089\" width=\"487\" height=\"409\" title=\"Copypaste1\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Right click on the data and select \u201ccopy\u201d<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-901e8465 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Copypaste2.png\" alt=\"\" class=\"uag-image-2090\" width=\"601\" height=\"501\" title=\"Copypaste2\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Open Stata, then select Data Editor(Edit)<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-2408e55c wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Copypaste3.png\" alt=\"\" class=\"uag-image-2091\" width=\"499\" height=\"299\" title=\"Copypaste3\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The Data Editor spreadsheet will open.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-4f87cf8e wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Copypaste4.png\" alt=\"\" class=\"uag-image-2092\" width=\"330\" height=\"272\" title=\"Copypaste4\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Go to Stata Toolbar and click on Edit, then click on Paste<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-394c9ce3 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Copypaste5.png\" alt=\"\" class=\"uag-image-2093\" width=\"738\" height=\"429\" title=\"Copypaste5\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A pop-up message will appear asking you if you would like to treat the first row as the variable names or data. If the first row contains variable names, select the option variable names.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-2a0d13f2 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Copypaste6.png\" alt=\"\" class=\"uag-image-2094\" width=\"515\" height=\"390\" title=\"Copypaste6\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The data will now be pasted into Stata.<\/p>\n\n\n\n<div class=\"wp-block-uagb-image uagb-block-c4e3a8d8 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" src=\"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Copypaste7.png\" alt=\"\" class=\"uag-image-2095\" width=\"603\" height=\"474\" title=\"Copypaste7\" loading=\"lazy\" role=\"img\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding types of data in Stata<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After entering data into Stata, the data will appear in either black, red or blue colours. It is important to understand what the different colours mean.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Black data represents numerical data (for instance, 1, 10, 100), which Stata can manipulate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Red data represents string data, which cannot be manipulated (for instance, male and female).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Blue data represents data that has value labels attached to it (for instance, male=1, female=2).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In conclusion, there are several ways of entering data into Stata. This post has demonstrated manual data entry, data entry through importation from other programs, and data entry by copying from other programs and pasting into Stata.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Related Posts<\/strong><\/p>\n\n\n<ul class=\"wp-block-latest-posts__list wp-block-latest-posts is-layout-flow wp-block-latest-posts-is-layout-flow\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/resourcefulscholarshub.com\/?p=2204\">Ethical Use of Generative AI in PhD Research: A Practical Guide for Students<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/resourcefulscholarshub.com\/?p=2102\">Stata Tutorial #3: Data Exploration in Stata<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/resourcefulscholarshub.com\/?p=2068\">Stata Tutorial #2: Data Entry in Stata<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/resourcefulscholarshub.com\/?p=2025\">Stata Tutorial #1: Introduction to Stata<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/resourcefulscholarshub.com\/?p=1984\">Kobo Toolbox Tutorial #9: Data Management in Kobo Toolbox<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>How do you enter data into Stata? In this post, I will discuss and illustrate three main methods of data [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2096,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uag_custom_page_level_css":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_monsterinsights_skip_tracking":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[28],"tags":[],"class_list":["post-2068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-stata"],"author_meta":{"display_name":"Grace Njeri-Otieno","author_link":"https:\/\/resourcefulscholarshub.com\/?author=3"},"featured_img":"https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image-300x169.jpg","uagb_featured_image_src":{"full":["https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image.jpg",924,520,false],"thumbnail":["https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image-150x150.jpg",150,150,true],"medium":["https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image-300x169.jpg",300,169,true],"medium_large":["https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image-768x432.jpg",768,432,true],"large":["https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image.jpg",924,520,false],"1536x1536":["https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image.jpg",924,520,false],"2048x2048":["https:\/\/resourcefulscholarshub.com\/wp-content\/uploads\/2026\/01\/Stata-tutorial-2_featured-image.jpg",924,520,false]},"uagb_author_info":{"display_name":"Grace Njeri-Otieno","author_link":"https:\/\/resourcefulscholarshub.com\/?author=3"},"uagb_comment_info":0,"uagb_excerpt":"How do you enter data into Stata? In this post, I will discuss and illustrate three main methods of data [&hellip;]","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/resourcefulscholarshub.com\/?cat=28\" class=\"advgb-post-tax-term\">Data Analysis using STATA<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">Data Analysis using STATA<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 9 months ago","modified":"Updated 9 months ago"},"absolute_dates":{"created":"Posted on January 23, 2026","modified":"Updated on January 22, 2026"},"absolute_dates_time":{"created":"Posted on January 23, 2026 10:30 am","modified":"Updated on January 22, 2026 7:34 pm"},"featured_img_caption":"","series_order":"","_links":{"self":[{"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=\/wp\/v2\/posts\/2068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2068"}],"version-history":[{"count":2,"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=\/wp\/v2\/posts\/2068\/revisions"}],"predecessor-version":[{"id":2099,"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=\/wp\/v2\/posts\/2068\/revisions\/2099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=\/wp\/v2\/media\/2096"}],"wp:attachment":[{"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resourcefulscholarshub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}