Вы находитесь на странице: 1из 4

RMT ASSIGNMENT (STATA)

Submitted by: Muhammad Umar Munir (F2016096013)


Waqas Ahmed (S2018096002)

Date: 12 April 2018

PROBLEM:
John is appointed as Analyst in XYZ Company. He is having access to the data base of
some companies now he needs to formulate model then interpret results by using STATA
modeling. He also needs to apply some normality tests for the authenticity of data would
you please like to help him with your STATA expertise?

SOLUTION:
We will perform the following steps on the available data to help Mr. John analyze data.

1. Importing the data:


We will import the data into the stata software using the following path:
File  Import  Excel Spreadsheet
After importing data, all variables will be shown into the variable pane.

2. Encoding string data:


Upon viewing the data in the data editor, it was found that Company variable is in
string data. Since stata will not perform any operation in string data, we need to
encode this data into a new variable. Following command will be used:

encode Company, gen (New_Co)

After executing the above command, a new variable “New_Co” is created with the
updated data.

3. Descriptive Statistics:
The first step in any statistical analysis is showing descriptive analysis table. Following
command will be used:

 sum CFO Boardcomposition FirmSize lnMVE ROA


 tabstat CFO Boardcomposition FirmSize lnMVE ROA, statistics( mean
median skewness kurtosis ) columns(variables)

1
Std.
Variable Obs Mean Min Max
Dev.
CFO 200 3.765619 33.16534 -0.27513 419.9192
Board
composition 200 0.1630835 0.159484 0 0.928571
Firm Size 200 16.51883 3.844256 4.49981 24.10458
lnMVE 200 19.45454 3.517696 8.642944 26.11914
ROA 200 2.145262 13.13756 -0.19188 109.4778

Board Firm
Stats CFO lnMVE ROA
composition Size
mean 3.765619 0.1630835 16.51883 19.45454 2.145262
Median 0.098538 0.125 16.79722 19.65752 0.078969
-
skewness 10.82497 1.648994 0.8322905 -0.54505 6.604378
kurtosis 129.0753 6.790688 4.172095 3.660556 46.56194

4. Regression model:
Since we have developed our regression model, we will run that regression equation
to obtain results for further analysis. We need to ensure that first we have to identify
dependent variable and then independent variable:

reg CFO Boardcomposition FirmSize lnMVE ROA

2
5. Predicting error terms (residuals):
We need to analyze error term to identify any abnormal data. We will use the following
command:
predict r, resid
After executing the above command, the new variable “r” is created.

6. Analyzing normality:
We would use “pnorm” and “qnorm” commands to identify normality of data and if any
certain data items to be deleted or not. “br” command is used to extract outlier. “drop
in” command is used to delete outlier.

3
200
100
Residuals

0
-100
-200

-50 0 50
Inverse Normal

Final qnorm graph is an under:


4
2
Residuals

0
-2
-4

-4 -2 0 2 4
Inverse Normal