Thursday, March 15, 2018

Hôm nay tôi buồn

15-3-2018 --- Đã giữa tháng rồi và bài viết vẫn dang dở. Dữ liệu gọi là đủ nhưng có lẽ sai ngay từ lý luận và cách làm ban đầu nên kết quả thống kê chả ra sao. Hôm nay rõ buồn, khi mà mọi thứ kỳ vọng đều quay lưng. Hãy nhìn dưới đây, các thể loại p-value, 95CI hay Odds ratio đều lớn chưa từng thấy. Dẫu sao thì, nếu look at the brighted-side, vẫn có một vài điểm sáng, như kiểu page Khoa hoạt động tốt hơn hay đang lần mò và nhớ lại các thứ về Fisher test (kiểm định sai khác tỷ lệ theo Fisher) và Chisquared test (kiểm định Khi-bình phương phi tham số).

> mdat<-read.csv("D:thR/mdat.csv", sep=";", header=TRUE)
> head(mdat)
  Number  Acquirer FirmsizeA          Target FirmsizeT Year  Stake  Categories Performance
1    M01    KinhDo    listed          Wall's   foreign 2003    50% acquisition    positive
2    M02    KinhDo    listed         Tribeco    listed 2005 35.40% acquisition    negative
3    M03 Sacombank    listed             ANZ   foreign 2005    10% acquisition    positive
4    M04       ACB    listed StandardCharter   foreign 2005    10%      merger    positive
5    M05      OCBC   foreign          VPBank     Other 2006    10% acquisition    positive
6    M06      HSBC   foreign     Techcombank     Other 2007    15% acquisition         mix
> hieuqua1 <- xtabs(~Performance+FirmsizeA, data=mdat)
> hieuqua1
FirmsizeA
Performance foreign listed other SOE
   mix            8      2     1   2
   negative      12     10     0   0
   positive      20     20     2   2
> hieuqua2 <- xtabs(~Performance+FirmsizeT, data=mdat)
> hieuqua2
           FirmsizeT
Performance foreign listed other SOE
   mix            1      5     5   2
   negative       1     14     6   1
   positive       7     21    10   6
> hieuqua3 <- xtabs(~Performance+Categories, data=mdat)
> hieuqua3
           Categories
Performance acquisition merger
   mix               12      1
   negative          19      3
   positive          36      8
> hieuqua4 <- xtabs(~Performance+Stake1, data=mdat)
> hieuqua4
           Stake1
Performance above under
   mix         10     3
   negative    15     7
   positive    34    10
> hieuqua1 <- read.table("D:thR/hieuqua1.txt", header=TRUE)
> hieuqua1 %% hiệu quả thương vụ theo công ty bên mua
         pos neg
foreign   20  20
domestic  24  15
> chisq.test(hieuqua1)

        Pearson's Chi-squared test with Yates' continuity correction

data:  hieuqua1
X-squared = 0.64913, df = 1, p-value = 0.4204

> fisher.test(hieuqua1)

        Fisher's Exact Test for Count Data

data:  hieuqua1
p-value = 0.3675
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.2319835 1.6743821
sample estimates:
odds ratio
 0.6287781
> hieuqua3 <- read.table("D:thR/hieuqua3.txt", header=TRUE)
> hieuqua3
            neg pos
acquisition  31  36
merger        4   8
> fisher.test(hieuqua3)

        Fisher's Exact Test for Count Data

data:  hieuqua3
p-value = 0.5333
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.4097017 8.5311756
sample estimates:
odds ratio
  1.710729

> hieuqua4 <- read.table("D:thR/hieuqua4.txt", header=TRUE)
> hieuqua4
        pos neg
under35  34  25
above35  10  10
> fisher.test(hieuqua4)

        Fisher's Exact Test for Count Data

data:  hieuqua4
p-value = 0.6086
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.4323871 4.2581433
sample estimates:
odds ratio
  1.354644

> chisq.test(hieuqua4)

        Pearson's Chi-squared test with Yates' continuity correction

data:  hieuqua4
X-squared = 0.11087, df = 1, p-value = 0.7392

> hieuqua2 <- read.table("D:thR/hieuqua2.txt", header=TRUE)
> hieuqua2 %%% đánh giá thương vụ theo bên bán (target)
         pos neg
foreign    7   2
domestic  37  33
> fisher.test(hieuqua2)

        Fisher's Exact Test for Count Data

data:  hieuqua2
p-value = 0.2851
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
  0.5355356 32.4313082
sample estimates:
odds ratio
    3.0812
> hdmodel1 <- xtabs(~FirmsizeA+Categories+Performance, data=mdat)
> ftable(hdmodel1)
                      Performance mix negative positive
FirmsizeA Categories                                  
foreign   acquisition               8       11       19
          merger                    0        1        1
listed    acquisition               2        8       13
          merger                    0        2        7
other     acquisition               1        0        2
          merger                    0        0        0
SOE       acquisition               1        0        2
          merger                    1        0        0
gộp lại thành bảng như sau:
FirmsizeA  Categories Neg Pos
1   foreign acquisition  19  19
2   foreign      merger   1   1
3  domestic acquisition  12  17
4  domestic      merger   3   7
Chạy mô hình logit đa biến:
> hqmodel1 <- read.table("D:thR/hqmodel1.txt", header=T)
> contrasts(hqmodel1$FirmsizeA)=contr.treatment(levels(hqmodel1$FirmsizeA), base=2)
> hqmodel1
  FirmsizeA  Categories Neg Pos
1   foreign acquisition  19  19
2   foreign      merger   1   1
3  domestic acquisition  12  17
4  domestic      merger   3   7
> contrasts(hqmodel1$Categories)=contr.treatment(levels(hqmodel1$Categories), base=2)
> fit.hqmodel1=vgml(cbind(Pos,Neg)~FirmsizeA+Categories, data=hqmodel1,family=multinomial)
Error in vgml(cbind(Pos, Neg) ~ FirmsizeA + Categories, data = hqmodel1,  :
  could not find function "vgml"
> fit.hqmodel1=vglm(cbind(Pos,Neg)~FirmsizeA+Categories, data=hqmodel1,family=multinomial)
> summary(fit.hqmodel1)

Call:
vglm(formula = cbind(Pos, Neg) ~ FirmsizeA + Categories, family = multinomial,
    data = hqmodel1)


Pearson residuals:
         [,1]
[1,]  0.05912
[2,] -0.26206
[3,] -0.06886
[4,]  0.12370

Coefficients:
                      Estimate Std. Error z value Pr(>|z|)
(Intercept)             0.3685     0.7267   0.507    0.612
FirmsizeAdomestic       0.3934     0.4753   0.828    0.408
Categoriesacquisition  -0.3877     0.6874  -0.564    0.573

Number of linear predictors:  1

Name of linear predictor: log(mu[,1]/mu[,2])

Residual deviance: 0.0912 on 1 degrees of freedom

Log-likelihood: -6.0144 on 1 degrees of freedom

Number of iterations: 3

Reference group is level  2  of the response

Mô hình không có ý nghĩa thống kê, các p-value quá lớn (lớn hơn 0,05). Chưa đủ cơ sở để kết luận quy mô công ty và loại hình thương vụ ảnh hưởng lên tính tích cực/tiêu cực của kết quả sau M&A.

By Lavender

No comments:

Post a Comment