ホーム勉強・学習・資格MBAR言語によるクロンバックα...

R言語によるクロンバックα信頼性係数の計測

現在、バンコクにおけるQRコード支払いの市場調査を行っています。その一環で、SPSSを使って情報処理をしようと思ったのですが、折角なのでR言語とRStudioを使って計測できた方が将来的に自分のためになりそうだなと思い、数年ぶりにR言語を触っています。

今回はその備忘も含めて、クロンバックα信頼性係数をどのように対応したのか記します。

RとRStudioのインストール

RとRStudioの魅力は何と言っても統計関連のことが一通りできるツールを無料で使えることです。どこまで高度なことができるのかは、まだ使ってみないとわかりませんが、僕が通っているビジネス大学院レベルでは全く問題なくカバーできます。

初めての方は、R言語とRStudioのインストールは下記のリンクを参考にするといいと思います。

R と R Studioのインストール – Qiita

最近、ビジネスサイドの職種向けにRの勉強会を始めました。
https://rba.connpass.com/

その際にRとR Studioをまとめて紹介したときの説明です。
Rに興味はあるけど、まだ使ったことがないという方、ぜひこの…

信頼性係数を計測するのに必要なライブラリーのインストール

ここからはまずは、下記のライブラリーをインストールし、読み込む。

install.packages("psych")          #psychライブラリインストール
library(psych)                     #ライブラリ読み込み
getwd()                            #ワーキングディレクトリ確認
stewed("~/YOUR-WORKING-DIRECTORY") #ワーキングディレクトリ変更

データ読み込み

#ファイル名直打ち
dat 

クロンバックα信頼性係数を計測してみる

# デフォルトの値
alpha(x, keys=NULL,cumulative=FALSE, title=NULL, max=10,na.rm = TRUE,
 check.keys=FALSE,n.iter=1,delete=TRUE,use="pairwise",warnings=TRUE,n.obs=NULL)

# 信頼性係数計測
alpha(dat[,-1]) # 1列目を読み込まない

では、このalphaが何なのか、ざっと調べてみると、

Alpha is one of several estimates of the internal consistency reliability of a test.

Surprisingly, more than a century after Spearman (1904) introduced the concept of reliability to psychologists, there are still multiple approaches for measuring it. Although very popular, Cronbach's α (1951) underestimates the reliability of a test and over estimates the first factor saturation.

alpha (Cronbach, 1951) is the same as Guttman's lambda3 (Guttman, 1945) and may be found by

Lambda 3 = (n)/(n-1)(1-tr(Vx)/(Vx) = (n)/(n-1)(Vx-tr(Vx)/Vx = alpha

Perhaps because it is so easy to calculate and is available in most commercial programs, alpha is without doubt the most frequently reported measure of internal consistency reliability. Alpha is the mean of all possible spit half reliabilities (corrected for test length). For a unifactorial test, it is a reasonable estimate of the first factor saturation, although if the test has any microstructure (i.e., if it is “lumpy") coefficients beta (Revelle, 1979; see ICLUST) and omega_hierchical (see omega) are more appropriate estimates of the general factor saturation. omega_total (see omega) is a better estimate of the reliability of the total test.

なのだとか。色々調べてみると、このalpha関数はクロンバックのα信頼係数計測と、Guttman's Lambda6が計測できるらしい。

ということで、先ほどの結果を見てみると(私のデータでは)下記のようになる。

> alpha(dat[,-1])
Some items ( X1.1 X1.2 X1.3 X1.4 ) were negatively correlated with the total scale and 
probably should be reversed.  
To do this, run the function again with the 'check.keys=TRUE' option
Reliability analysis   
Call: alpha(x = dat[, -1])

  raw_alpha std.alpha G6(smc) average_r S/N
      0.94      0.95       1      0.38  19

 Reliability if an item is dropped:
     raw_alpha std.alpha G6(smc) average_r S/N
X1.1      0.94      0.95       1      0.40  19
X1.2      0.95      0.95       1      0.40  20
X1.3      0.94      0.95       1      0.40  19
X2.1      0.94      0.95       1      0.38  18
#略
 Item statistics 
         r r.cor r.drop
X1.1 0.270 0.270   0.27
X1.2 0.184 0.184   0.18
X1.3 0.294 0.294   0.30
X2.1 0.677 0.677   0.65
#略
Non missing response frequency for each item
        1    2    3    4    5 miss
X1.1 0.39 0.06 0.33 0.11 0.11    0
X1.2 0.39 0.11 0.28 0.11 0.11    0
X1.3 0.22 0.11 0.17 0.33 0.17    0
X2.1 0.11 0.06 0.17 0.17 0.50    0
#略
There were 34 warnings (use warnings() to see them)

ここではwarningが出ているので、

warnings() #warningの内容確認
alpha(dat[,-1], check.keys=TRUE)  #reversedオプション追加

デフォルトでは負の相関を持つ変数が逆転項目として処理しないので、check.keysをTrueにすることで、逆転項目として計算する。

クロンバックα信頼性係数計測のみを抽出したい場合

alpha関数だけで、全てがまかなえるようだが、クロンバックα信頼性係数のみを抽出するというのも可能。でも、あまり情報量がない。

関連のライブラリーをインストールして読み込みます。

install.packages("ltm")
library(ltm)

そして、クロンバックメソッドを読み込めばOK

> cronbach.alpha(dat[,-1])

Cronbach's alpha for the 'dat[, -1]' data-set

Items: 30
Sample units: 18
alpha: 0.942

次は、各Itemを各Factorに紐付けかな。

以上「R言語によるクロンバックα信頼性係数の計測」についてでした

亀山 翔大
亀山 翔大
東京都出身。MBA。Project, Program, Portfolio Managementを専門。PMOとして働きつつ、イギリス大学院でサイバーセキュリティを学ぶ。前職である国連にて国連世界ICT戦略遂行、国連グローバルPMO推進。UN KUDOS! Award 2019優勝。プロジェクト(プログラム)マネジメント(PRINCE2/MSP)、サイバーセキュリティ(NIST CSF)等の資格を有する。 プロフィール詳細はこちら

返事を書く

あなたのコメントを入力してください。
ここにあなたの名前を入力してください

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

- Advertisment -