Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Homework 1: Data Basics

Note: you should do all calculations in this task in Stata, using Stata commands. You also should write all text answers to the questions in Stata as comments under *. This way all your analysis results and text answers will be in one log file which I will check and grade. Upload your final log and cmdlog files to Canvas for this assignment.

For this task you will be working with data from World Management Survey. Brief description of this data is in Lecture 2 slides. Files for this case study are on Canvas, Files menu, folder Cases, folder WMS. Variables descriptions are in VARIABLES_wms file.

1.   Data preparation

Open Stata and start logging your analysis (log and cmdlog commands - you will need to submit both files).

Use the following datafile: wms_da_textbook.csv

Import this dataset in csv format  into Stata.

Keep only the following varables in your dataset: firmid wave country sic management operations monitor target people emp_firm ownership competition export degree_m degree_t

Sort data on firmid wave variables  and  browse the data. You can see that some firmid are repeated – some firms were surveyed in several waves. We need to keep only one observation per firm. One way to do it is this:

sort firmid

count if firmid== firmid[_n- 1]

drop if firmid== firmid[_n- 1]

What is the number of variables and observations in the dataset now?

What variables are  in string format  in your data? Convert string variables that contain only numbers and potentially NA for missing values into numeric format.

2.   Data cleaning

Produce a table with summary statistics for all numeric variables in Stata. Tabulate remaining string variables.

Do some variables  have implausible values  (e.g.  negative or zero values where they are  not possible)? If yes, replace to missings.

Analyze missing values. Are there variables that have more than 10% of missings? For the variable with the largest number of missings, check if the share of missings varies by country (one way to do it is to create dummy variable for missings in this variable and summarize this dummy by country).

3.   Data exploration

There  are  five  variables  with  different   management  scores  of  companies:  management operations monitor target people

Provide correlation table for these five variables. Are they highly correlated?

Summarize these variables by countries. Which countries have the highest management scores and which have the lowest?

Summarize these variables by ownership type. Do you observe any correlation of management quality with type of ownership?

Provide correlation table for five management variables with the % of managers and % of workers with college education. Do you observe a significant correlation there?

4.   Adding country-level variable (additional task not required but encouraged)

Using  World  Development  Indicators  website  (World  Development  Indicators   |  DataBank (worldbank.org)), find country-level data on GDP  per capita  in  PPP  in  2010 for all countries covered in WMS data.

Download this  data  on  GDP  as  csv file  and  import  it  into  Stata format  (use  separate  Stata window). In your management data you need to create a variable with the 3-letter country codes, same as in WDI data you downloaded (these variables also should have the same name in both

datasets). Merge two datasets on country code (command merge).

Summarize the GDP per capita variable.

Provide correlation table for five management variables with GDP per capita. Can you make any conclusions?