You are on page 1of 7

YOUR WORST ENEMY IS YOUR BEST FRIEND.

HE/SHE MOTIVATES YOU TO GO FOR THE BEST.


EVEN THE WORST CRITIC IN THE WORLD IS A MAJOR CONTRIBUTOR TO UR SUCCESS.

. tabstat price rep78 weight mpg,by(foreignd) stat(mean sd min max skew kurt cv
> p25 p50 p75 p99) col(stat)
Summary for variables: price rep78 weight mpg
by categories of: foreignd (foreign D)
foreignd |
mean
sd
min
max skewness kurtosis
---------+-----------------------------------------------------------0 | 6384.682 2621.915
3748
12990 1.215236 3.555178
| 4.285714 .7171372
3
5 -.4592793 2.104167
| 2315.909 433.0035
1760
3420 1.056582 3.368013
| 24.77273 6.611187
14
41 .657329 3.10734
---------+-----------------------------------------------------------1 | 6072.423 3097.104
3291
15906 1.777939 5.090316
| 3.020833 .837666
1
5 -.0388361 3.574874
| 3317.115 695.3637
1800
4840 -.24371 2.784673
| 19.82692 4.743297
12
34 .7712432 3.441459
---------+-----------------------------------------------------------Total | 6165.257 2949.496
3291
15906 1.653434 4.819188
| 3.405797 .9899323
1
5 -.0570331 2.678086
| 3019.459 777.1936
1760
4840 .1481164 2.118403
| 21.2973 5.785503
12
41 .9487176 3.975005
---------------------------------------------------------------------foreignd |
cv
p25
p50
p75
p99
---------+-------------------------------------------------0 | .4106571
4499
5759
7140
12990
| .167332
4
4
5
5
| .1869691
2020
2180
2650
3420
| .2668736
21
24.5
28
41
---------+-------------------------------------------------1 | .5100278
4184
4782.5
6234
15906
| .2772963
3
3
3
5
| .209629
2790
3360
3730
4840
| .2392352
16.5
19
22
34
---------+-------------------------------------------------Total | .478406
4195
5006.5
6342
15906
| .290661
3
3
4
5
| .2573949
2240
3190
3600
4840
| .2716543
18
20
25
41
------------------------------------------------------------

ttest price, by(foreignd)


Two-sample t test with equal variances
-----------------------------------------------------------------------------Group |
Obs
Mean
Std. Err. Std. Dev. [95% Conf. Interval]
---------+-------------------------------------------------------------------0 |
22
6384.682
558.9942
2621.915
5222.19
7547.174
1 |
52
6072.423
429.4911
3097.104
5210.184
6934.662
---------+-------------------------------------------------------------------combined |
74
6165.257
342.8719
2949.496
5481.914
6848.6

---------+-------------------------------------------------------------------diff |
312.2587
754.4488
-1191.708
1816.225
-----------------------------------------------------------------------------diff = mean(0) - mean(1)
t = 0.4139
Ho: diff = 0
degrees of freedom =
72
Ha: diff < 0
Pr(T < t) = 0.6599

Ha: diff != 0
Pr(|T| > |t|) = 0.6802

Ha: diff > 0


Pr(T > t) = 0.3401

. ttest mpg, by(foreignd)


Two-sample t test with equal variances
-----------------------------------------------------------------------------Group |
Obs
Mean
Std. Err. Std. Dev. [95% Conf. Interval]
---------+-------------------------------------------------------------------0 |
22
24.77273
1.40951
6.611187
21.84149
27.70396
1 |
52
19.82692
.657777
4.743297
18.50638
21.14747
---------+-------------------------------------------------------------------combined |
74
21.2973
.6725511
5.785503
19.9569
22.63769
---------+-------------------------------------------------------------------diff |
4.945804
1.362162
2.230384
7.661225
-----------------------------------------------------------------------------diff = mean(0) - mean(1)
t = 3.6308
Ho: diff = 0
degrees of freedom =
72
Ha: diff < 0
Pr(T < t) = 0.9997

Ha: diff != 0
Pr(|T| > |t|) = 0.0005

Ha: diff > 0


Pr(T > t) = 0.0003

. save
invalid file specification
r(198);
. save, replace
file D:\amit\NIBM\TERM-III\RMPS\stata\autodata.dta saved
. su mpg
Variable |
Obs
Mean
Std. Dev.
Min
Max
-------------+-------------------------------------------------------mpg |
74
21.2973
5.785503
12
41
. su mpg trunk
Variable |
Obs
Mean
Std. Dev.
Min
Max
-------------+-------------------------------------------------------mpg |
74
21.2973
5.785503
12
41
trunk |
74
13.75676
4.277404
5
23
. su mpg.detail
variable detail not found
r(111);
. su mpg.detail
variable detail not found
r(111);
. su mpg,detail
mpg

------------------------------------------------------------Percentiles
Smallest
1%
12
12
5%
14
12
10%
14
14
Obs
74
25%
18
14
Sum of Wgt.
74
50%
75%
90%
95%
99%

20
25
29
34
41

Largest
34
35
35
41

Mean
Std. Dev.

21.2973
5.785503

Variance
Skewness
Kurtosis

33.47205
.9487176
3.975005

here in percentile the avg. mpg is 20, min-12 & max-41. this
max 41 is creating large variance of 33.47.
kurt is 3.97 is laptocurtic.
su trunk, detail
trunk
------------------------------------------------------------Percentiles
Smallest
1%
5
5
5%
7
6
10%
8
7
Obs
74
25%
10
7
Sum of Wgt.
74
50%
75%
90%
95%
99%

14
17
20
21
23

Largest
21
21
22
23

Mean
Std. Dev.

13.75676
4.277404

Variance
Skewness
Kurtosis

18.29619
.0292034
2.192052

.
even the mean 13.75 and median 14 is very closure and ske is near to 0,
which shows that it is a normal distributed, but we also need to see the
4th moment i.e. kurt, which is 2.19 i.e. platocurtic. hence it is not normal.

sktest mpg trunk


Skewness/Kurtosis tests for Normality
------- joint -----Variable | Pr(Skewness) Pr(Kurtosis) adj chi2(2)
Prob>chi2
-------------+------------------------------------------------------mpg |
0.002
0.080
10.95
0.0042
trunk |
0.912
0.044
4.19
0.1228
.
mpg is not normal, but trunk is normal. see class notes.
because we can safely reject the ho : that there is no excess skew and kurt
in mpg. but we cann't reject the ho : that there is no excess skew in

trunk since the pr is very high. but we can reject the Ho : that there is
no excess kurt in trunk. hence jointly at the significance level of 5%
we cannot reject the Ho : that there is no excess skew & kurt and hence is not n
ormal.

. reg price mpg foreignd gear_ratio displacement headroom length rep78


Source |
SS
df
MS
-------------+-----------------------------Model | 301537305
7 43076757.8
Residual | 275259654
61 4512453.34
-------------+-----------------------------Total | 576796959
68 8482308.22

Number of obs
F( 7,
61)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

69
9.55
0.0000
0.5228
0.4680
2124.3

-----------------------------------------------------------------------------price |
Coef. Std. Err.
t
P>|t|
[95% Conf. Interval]
-------------+---------------------------------------------------------------mpg | -58.55192 80.56935
-0.73 0.470
-219.6603
102.5565
foreignd |
-3191.5 987.2306
-3.23 0.002
-5165.59
-1217.41
gear_ratio | -372.8468 1190.573
-0.31 0.755
-2753.545
2007.851
displacement | 26.77955 7.013338
3.82 0.000
12.75552
40.80359
headroom | -640.6969 356.8875
-1.80 0.078
-1354.338
72.9437
length | 1.790722 27.67926
0.06 0.949
-53.55738
57.13882
rep78 | 316.5449 342.8423
0.92 0.359
-369.0106
1002.1
-cons(a) | 5935.526 6429.707
0.92 0.360
-6921.468
18792.52
-----------------------------------------------------------------------------the variable, which has high t value and low p value are significant and we can
not
reject the Ho : that the Beta is not significant. in the case of variables with
low p
we can safely reject Ho : and say that the variable are significantly different
from 0.
F stat is more powerful and check for overall significane here Ho : all coeffici
ent are 0 that
mean no variable affect the price, hence by rejecting Ho : a = B1 = B2 = ... = 0
,
here f is 9.55 and p =0 that mean we can safely reject the null and the model is
having some
variable, which explain the price, but it does not tell, which variable. hence t
o check we will
check the t test. the t test will tell us the insiginificant variable, which we
should
eliminate from the model.
hence go for the f test first and than go for t test. if in f test itself we can
n't
reject the HO : mean model is poor and we need not to go further for t test.

After regression there are many other test. to check the 1- multicolinearly, 2heteroscedasticity
& 3- serial correlation.

serial correlation :the independent variable should be independent of error ter


m. to check this DW test
is there. the car price go if the steel price go up. we assume that there is no
relationship, but it is there
. it may not be there in cross section data. but it may be there in penal data.
it is temporal relationship, which is
hidden in the error term.
if multicolinertly will be there it will increase the R square but will reduce t
he t value.
hence to check we normalise the size by taking ratio. e.g. we want to check the
performance of assets
of two banks. the profit size may be differencent for two banks. hence we take t
he ROA to compare.
if hetroscedasticity that the var is not constant, means error term is having so
me information.
with lots of data there will be high var and it will not follow the normal dist.
to remove this hetrosce
we can remove certain variable or take log to make some variable normal.
. pwcorr price mpg foreignd gear_ratio displacement headroom length rep78,sig
|
price
mpg foreignd gear_r~o displa~t headroom length
-------------+--------------------------------------------------------------price | 1.0000
|
|
mpg | -0.4686 1.0000
| 0.0000
|
foreignd | -0.0487 -0.3934 1.0000
| 0.6802 0.0005
|
gear_ratio | -0.3137 0.6162 -0.7067 1.0000
| 0.0065 0.0000 0.0000
|
displacement | 0.4949 -0.7056 0.6138 -0.8289 1.0000
| 0.0000 0.0000 0.0000 0.0000
|
headroom | 0.1145 -0.4138 0.2939 -0.3779 0.4745 1.0000
| 0.3313 0.0002 0.0110 0.0009 0.0000
|
length | 0.4318 -0.7958 0.5702 -0.6964 0.8351 0.5163 1.0000
| 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
|
rep78 | 0.0066 0.4023 -0.5922 0.4103 -0.4119 -0.1480 -0.3606
| 0.9574 0.0006 0.0000 0.0005 0.0004 0.2249 0.0023
|
|
rep78
-------------+--------rep78 | 1.0000
|
the mpg and gear are positively correlated by .6162. but it is not telling which
is affecting which.

i may get high R square, but my regression will be biased. hence is will drop ei
ther of them to
free the model from the biasness. if our objective allow the multicolinerty upto
certail level,
we can go upto certail multicoliner variable. here null HO : the correlation is
zero. the lower value are
prob of committing error in rejecting the HO. hence we can safely reject the HO
: there is no correlation
in mpg and gear. hence there is significant correlation between both of them.
hence at the top in command the sig is the significance level asked by the comma
nd.
if i modify the command. i am asking the stata to pin point the highly significa
nt correlation.
report me 5% signifiance data and put star on 1% significant data.
pwcorr mpg foreignd gear_ratio displacement headroom length rep78,print(0.05) s
tar (0.01)
|
mpg foreignd gear_r~o displa~t headroom length
rep78
-------------+--------------------------------------------------------------mpg | 1.0000
foreignd | -0.3934* 1.0000
gear_ratio | 0.6162* -0.7067* 1.0000
displacement | -0.7056* 0.6138* -0.8289* 1.0000
headroom | -0.4138* 0.2939 -0.3779* 0.4745* 1.0000
length | -0.7958* 0.5702* -0.6964* 0.8351* 0.5163* 1.0000
rep78 | 0.4023* -0.5922* 0.4103* -0.4119*
-0.3606* 1.0000
here the * value are correlated with 99% confidence level. which we need to remo
ve from the model.
we can also use the spearman correlation funcation.which is more relevant and gi
ves more
information about the correlation.
. spearman mpg foreignd gear_ratio displacement headroom length rep78,pw stats(r
ho obs p) star(0.01)
+-----------------+
| Key
|
|-----------------|
| rho
|
| Number of obs |
| Sig. level
|
+-----------------+
|
mpg foreignd gear_r~o displa~t headroom length
rep78
-------------+--------------------------------------------------------------mpg | 1.0000
|
74
|
|
foreignd | -0.3629* 1.0000
|
74
74
pr
| 0.0015
|

gear_ratio | 0.6098* -0.6895* 1.0000


|
74
74
74
prob
| 0.0000 0.0000
|
displacement | -0.7713* 0.6694* -0.8545* 1.0000
|
74
74
74
74
| 0.0000 0.0000 0.0000
|
headroom | -0.4866* 0.2984* -0.3842* 0.4785* 1.0000
|
74
74
74
74
74
| 0.0000 0.0098 0.0007 0.0000
|
length | -0.8314* 0.5740* -0.7056* 0.8525* 0.5324* 1.0000
|
74
74
74
74
74
74
| 0.0000 0.0000 0.0000 0.0000 0.0000
|
rep78 | 0.3143* -0.6069* 0.4269* -0.4713* -0.1663 -0.3898* 1.0000
|
69
69
69
69
69
69
69
| 0.0085 0.0000 0.0003 0.0000 0.1722 0.0009
|
here the * value are correlated with 99% confidence level. which we need to remo
ve from the model.
here the * value are having correlation and we can safely reject the Ho : that t
here is no correlation.
in case of headroom and rep78, though there is some correlation -0.1663 but if w
e reject the ho : that
there is no correlation, we will make error of 17.22%, hence we cannot reject t
he null HO and
say that there is no correlation between headroom and rep78.

CREDIT APPRAISAL SYSTEM OF MSME: A study taken at ORIENTAL BANK OF COMMERCE


WORKING CAPITAL ASSESSMENT AND TERM LOAN ASSESSMENT
Ministry of micro small and medium enterprises CGTMSE crEDEIT GUARANTEE TRUST
I WILL NOT MARRY AND WILL OBSERVE BRAMHACHARYA.

You might also like