井出草平の研究ノート

媒介分析の推定方法と尺度水準による推定結果の違い[Mplus]

www.statmodel.com

こちらのTable 8.29のケース。 もともとの推定は下記のエントリーで、こちらは最尤推定を行うモデルである。

ides.hatenablog.com

ides.hatenablog.com

アプローチ2 ロバスト重み付き最小二乗法

データはスタック形式、Analysis: estimator = wlsmv;で推定方法がロバスト重み付き最小二乗法である場合。まずは媒介変数intentをカテゴリカル(順序)と設定した場合。

コードで異なる部分は下記。

variable:
   categorical = ciguse intent;

variable:
    names = intent tx ciguse w;

    usev = tx ciguse intent;

    categorical = ciguse intent;
    freqweight = w;

Analysis:
        estimator = wlsmv;
        bootstrap = 1000;

結果。

                                                    Two-Tailed
                    Estimate       S.E.  Est./S.E.    P-Value

Effects from TX to CIGUSE

  Tot natural IE      -0.030      0.011     -2.641      0.008
  Pure natural DE     -0.046      0.024     -1.857      0.063
  Total effect        -0.076      0.026     -2.890      0.004

 Odds ratios for binary Y

  Tot natural IE       0.801      0.066     12.113      0.000
  Pure natural DE      0.753      0.119      6.345      0.000
  Total effect         0.603      0.108      5.568      0.000

媒介変数intentを連続変数とした場合。コードはvariable: categorical = ciguse;とintentを外す。これで連続変数として処理される。

Effects from TX to CIGUSE

Tot natural IE -0.021 0.008 -2.669 0.008 Pure natural DE -0.054 0.024 -2.225 0.026 Total effect -0.076 0.026 -2.888 0.004

Odds ratios for binary Y

Tot natural IE 0.853 0.050 16.897 0.000 Pure natural DE 0.707 0.113 6.273 0.000 Total effect 0.603 0.108 5.574 0.000

アプローチ3 ベイズ

推定方法をベイズにする。processorsは処理に使うコア数なので、自分のPCのコア数に応じて指定する。

Analysis:
        estimator = bayes;
        mediator = observed;
        processors = 2;
        biter = (10000);

結果。

                                Posterior  One-Tailed         95% C.I.
                    Estimate       S.D.      P-Value   Lower 2.5%  Upper 2.5%  Significance

Effects from TX to CIGUSE

    Tot natural IE    -0.029       0.011      0.003      -0.051      -0.009      *
    Pure natural DE   -0.047       0.025      0.029      -0.096       0.002
    Total effect      -0.076       0.026      0.002      -0.128      -0.025      *

 Odds ratios for binary Y

    Tot natural IE     0.806       0.063      0.000       0.688       0.935      *
    Pure natural DE    0.745       0.119      0.000       0.546       1.012      *
    Total effect       0.600       0.107      0.000       0.428       0.845      *

媒介変数intentを連続変数とした場合。

                                Posterior  One-Tailed         95% C.I.
                    Estimate       S.D.      P-Value   Lower 2.5%  Upper 2.5%  Significance

Effects from TX to CIGUSE

    Tot natural IE    -0.022       0.008      0.002      -0.039      -0.006      *
    Pure natural DE   -0.050       0.027      0.030      -0.103       0.002
    Total effect      -0.072       0.027      0.004      -0.126      -0.018      *

 Odds ratios for binary Y

    Tot natural IE     0.853       0.051      0.000       0.757       0.956      *
    Pure natural DE    0.732       0.126      0.000       0.525       1.013      *
    Total effect       0.622       0.114      0.000       0.440       0.888      *

まとめ

f:id:iDES:20200919181144p:plain

媒介変数を連続ではなく順序として扱うと、やや効果が大きくなり、治療による確率低下が少し大きくなり、オッズ比が1から少し離れる。とはいえ、媒介変数の強い床効果を考えると、順序と連続の媒介変数の間に比較的小さな差しかないと言ってよい、また、推定量や、媒介変数を観察されたものか、潜在的なものかといったことで、違いはほとんど見られなかった。