使用Study_1.dta之變數加總後資料檔

擬探討(Y) 主管對於其員工的績效評估(Performance Evaluation, PE),受到哪些變項(X)的影響? 依變數(Y):PE 主管對於其員工的績效評估 自變數(X) :與員工有關的:EPSMD EUPB。與主管有關的:SUPB SMD SMDIS

* 一、敘述統計、信度、效度

. summ PE    EPSMD EUPB      SUPB SMD SMDIS

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
          PE |        176    5.460227    1.211976          1          7
       EPSMD |        176    2.842045    1.473982          1          7
        EUPB |        176    2.198864    1.246419          1        5.5
        SUPB |        176    2.141098    1.378339          1          7
         SMD |        176    3.015909    1.361418          1          7
-------------+---------------------------------------------------------
       SMDIS |        176    2.134233    1.175343          1        6.5

* 二、相關係數
. pwcorr PE EPSMD EUPB SUPB SMD SMDIS, sig star(0.05)
* 二、相關係數

. pwcorr PE EPSMD EUPB SUPB SMD SMDIS, star(0.05)

             |       PE    EPSMD     EUPB     SUPB      SMD    SMDIS
-------------+------------------------------------------------------
          PE |   1.0000 
       EPSMD |  -0.0271   1.0000 
        EUPB |   0.0259   0.1610*  1.0000 
        SUPB |   0.0128   0.2044*  0.3425*  1.0000 
         SMD |  -0.1430   0.4670*  0.2657*  0.1455   1.0000 
       SMDIS |  -0.1620*  0.1565*  0.4359*  0.3108*  0.2587*  1.0000

. spearman PE EPSMD EUPB SUPB SMD SMDIS , star(0.05)
(obs=176)

             |       PE    EPSMD     EUPB     SUPB      SMD    SMDIS
-------------+------------------------------------------------------
          PE |   1.0000 
       EPSMD |  -0.0379   1.0000 
        EUPB |  -0.0448   0.1762*  1.0000 
        SUPB |  -0.0265   0.1817*  0.3078*  1.0000 
         SMD |  -0.1349   0.4425*  0.2587*  0.1115   1.0000 
       SMDIS |  -0.2682*  0.0933   0.4685*  0.2299*  0.2578*  1.0000
* 繪圖:相關係數矩陣圖 
. graph matrix PE EPSMD EUPB SUPB SMD SMDIS, half msymbol(+)
* 只呈現對角線一側
* 以加號+標示樣本點 map symbol

+corr PE.jpg

迴歸分析 Regression

. reg PE EPSMD EUPB SUPB SMD SMDIS

      Source |       SS           df       MS      Number of obs   =       176
-------------+----------------------------------   F(5, 170)       =      2.06
       Model |  14.6909752         5  2.93819504   Prob > F        =    0.0727
    Residual |  242.363949       170  1.42567029   R-squared       =    0.0572
-------------+----------------------------------   Adj R-squared   =    0.0294
       Total |  257.054924       175  1.46888528   Root MSE        =     1.194

------------------------------------------------------------------------------
          PE | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       EPSMD |   .0379821    .070111     0.54   0.589    -.1004181    .1763822
        EUPB |   .1283218    .084069     1.53   0.129    -.0376319    .2942754
        SUPB |   .0375892   .0718269     0.52   0.601    -.1041982    .1793766
         SMD |  -.1371568     .07761    -1.77   0.079    -.2903603    .0160466
       SMDIS |  -.2063759   .0880103    -2.34   0.020    -.3801097    -.032642
       _cons |   5.843743   .2770302    21.09   0.000     5.296881    6.390605
------------------------------------------------------------------------------

迴歸分析模型比較表 estout: Making regression tables in Stata

*** 安裝estout模組
ssc install estout, replace**
* 兩個員工變項EPSMD EUPB,對PE的影響
* M1: PE=f(EPSMD)
. reg PE EPSMD
. estimates store M1 

* M2: PE=f(EUPB)
. reg PE       EUPB
. estimates store M2

* M3: PE=f(EPSMD EUPB)
. reg PE EPSMD EUPB
. estimates store M3 

. esttab M1 M2 M3
------------------------------------------------------------
                      (1)             (2)             (3)   
                       PE              PE              PE   
------------------------------------------------------------
EPSMD             -0.0223                         -0.0264   
                  (-0.36)                         (-0.42)   

EUPB                               0.0251          0.0302   
                                   (0.34)          (0.40)   

_cons               5.524***        5.405***        5.469***
                  (27.70)         (29.04)         (22.64)   
------------------------------------------------------------
N                     176             176             176   
------------------------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
* 三個主管變項SUPB SMD SMDIS,對PE的影響
reg PE SUPB
esti store M4
reg PE SMD
esti store M5
reg PE SMDIS
esti store M6
reg PE SUPB SMD
esti store M7
reg PE SMD SMDIS
esti store M8
reg PE SUPB  SMDIS
esti store M9
* 主管 SUPB SMD SMDIS 三個 變項
reg PE SUPB SMD SMDIS
esti store M10
esttab M4 M5 M6 M7 M8 M9 M10

M10.png

* 員工與主管,五個變數全部考慮,區分員工、主管兩段,以便看出對於PE的影響
reg PE EPSMD EUPB SUPB SMD SMDIS
esti store M11
* 模型比較:個別變數、員工變數兩個、主管變數三個、五個變數全部考慮
esttab M1 M2 M3 M4 M5 M6  M10 M11

M11.png

* 模型比較:員工因素、主管因素、全部因素,三個模型,並且顯示顯著水準
* ar2: adjust R square 模型解釋變異程度的改變

. esttab M3 M10 M11, se ar2 

------------------------------------------------------------
                      (1)             (2)             (3)   
                       PE              PE              PE   
------------------------------------------------------------
EPSMD             -0.0264                          0.0380   
                 (0.0633)                        (0.0701)   

EUPB               0.0302                           0.128   
                 (0.0748)                        (0.0841)   

SUPB                               0.0686          0.0376   
                                 (0.0692)        (0.0718)   

SMD                                -0.101          -0.137   
                                 (0.0689)        (0.0776)   

SMDIS                              -0.162          -0.206*  
                                 (0.0831)        (0.0880)   

_cons               5.469***        5.964***        5.844***
                  (0.242)         (0.262)         (0.277)   
------------------------------------------------------------
N                     176             176             176   
adj. R-sq          -0.010           0.026           0.029   
------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
. esttab M3 M10 M11, p scalars(F df_m df_r)

------------------------------------------------------------
                      (1)             (2)             (3)   
                       PE              PE              PE   
------------------------------------------------------------
EPSMD             -0.0264                          0.0380   
                  (0.677)                         (0.589)   

EUPB               0.0302                           0.128   
                  (0.687)                         (0.129)   

SUPB                               0.0686          0.0376   
                                  (0.323)         (0.601)   

SMD                                -0.101          -0.137   
                                  (0.144)         (0.079)   

SMDIS                              -0.162          -0.206*  
                                  (0.053)         (0.020)   

_cons               5.469***        5.964***        5.844***
                  (0.000)         (0.000)         (0.000)   
------------------------------------------------------------
N                     176             176             176   
F                   0.145           2.555           2.061   
df_m                    2               3               5   
df_r                  173             172             170   
------------------------------------------------------------
p-values in parentheses
* p<0.05, ** p<0.01, *** p<0.001
esttab M3 M10 M11, label ///
title(線性迴歸模型比較) ///
nonumbers mtitles("M1 員工" "M2 主管" "M3 全部")  ///
addnote("日期:2022年10月。Source:Study_1.dta")

線性迴歸模型比較
--------------------------------------------------------------------
                          M1 員工         M2 主管         M3 全部   
--------------------------------------------------------------------
2. Employee Percep~i      -0.0264                          0.0380   
                          (-0.42)                          (0.54)   

3. Emplyee UPB             0.0302                           0.128   
                           (0.40)                          (1.53)   

1. Supervisor UPB                          0.0686          0.0376   
                                           (0.99)          (0.52)   

4. Supervisor Mora~g                       -0.101          -0.137   
                                          (-1.47)         (-1.77)   

6. Supervisor Mora~t                       -0.162          -0.206*  
                                          (-1.95)         (-2.34)   

Constant                    5.469***        5.964***        5.844***
                          (22.64)         (22.77)         (21.09)   
--------------------------------------------------------------------
Observations                  176             176             176   
--------------------------------------------------------------------
t statistics in parentheses
日期:2022年10月。Source:Study_1.dta
* p<0.05, ** p<0.01, *** p<0.001
* 確認工作目錄,以便檢視輸出的檔案
cd

* 模型比較結果,直接輸出至 MS-Excel CSV檔
esttab M3 M10 M11 using 202210ntue.csv

* 模型比較結果,直接輸出至 MS-Word rtf檔
esttab M3 M10 M11 using 202210ntue.rtf
或
esttab M3 M10 M11 using 202210ntue.doc