barttest
バートレットの検定
説明
例
非無作為なデータ変動を説明するために必要な次元数の特定
平均 mu = [0 0]
と共分散 sigma = [1 0.99; 0.99 1]
をもつ多変量正規分布から 20 行 6 列の 乱数の行列を生成します。
rng default % for reproducibility mu = [0 0]; sigma = [1 0.99; 0.99 1]; X = mvnrnd(mu,sigma,20); % columns 1 and 2 X(:,3:4) = mvnrnd(mu,sigma,20); % columns 3 and 4 X(:,5:6) = mvnrnd(mu,sigma,20); % columns 5 and 6
データ行列 X
の非無作為な変動を説明するために必要な次元数を特定します。仮説検定の有意値を報告します。
[ndim, prob] = barttest(X,0.05)
ndim = 3
prob = 5×1
0.0000
0.0000
0.0000
0.5148
0.3370
ndim
で返された値は、X
の非無作為な変動を説明するために 3 次元が必要であることを示しています。
入力引数
x
— 入力データ
スカラー値の行列
入力データ。スカラー値の行列として指定します。
データ型: single
| double
alpha
— 有意水準
0.05
(既定値) | (0,1)
の範囲のスカラー値
仮説検定の有意水準。(0,1)
の範囲のスカラー値として指定します。
例: 0.1
データ型: single
| double
出力引数
ndim
— 次元数
正の整数値
次元数。正の整数値として返します。次元は、一連の仮説検定により決定されます。ndim = 1
については、各主成分のデータ値の分散が等しいという仮説を検定し、ndim = 2
については、2 番目の成分から最後の成分の分散が等しいという仮説をテストします。それ以降も同様に行います。帰無仮説として、次元数は x
の共分散行列の最大の不等固有値の数に等しいものとします。
prob
— 有意値
範囲 (0,1)
のスカラー値のベクトル
仮説検定の有意値。範囲が (0,1)
のスカラー値のベクトルとして返します。prob
の各要素は chisquare
の要素に対応しています。
chisquare
— 検定統計量
スカラー値のベクトル
各次元の仮説検定の検定統計。スカラー値のベクトルとして返します。
バージョン履歴
R2006a より前に導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)