ドキュメンテーション
最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。
クラス: LinearMixedModel
線形混合効果モデルの応答ベクトル
y = response(lme)
y = response(lme) は、線形混合効果モデル lme の近似に使用する応答ベクトル y を返します。
y
lme
すべて展開する
LinearMixedModel
線形混合効果モデル。fitlme または fitlmematrix を使用して構築した LinearMixedModel オブジェクトを指定します。
fitlme
fitlmematrix
n 行 1 列のベクトルとして指定された応答値。ここで、n は観測値の数です。
データ型: single | double
single
double
標本データを読み込みます。
load(fullfile(matlabroot,'examples','stats','weight.mat'));
weight には長期間の調査によるデータが含まれています。そこには 20 人の被験者が 4 つの運動プログラムにランダムに割り当てられ、体重の減少が 2 週間の期間にわたって記録されています。このデータは、シミュレーションされたものです。
weight
データをテーブルに保存します。Subject および Program をカテゴリカル変数として定義します。
Subject
Program
tbl = table(InitialWeight,Program,Subject,Week,y); tbl.Subject = nominal(tbl.Subject); tbl.Program = nominal(tbl.Program);
線形混合効果モデルを近似します。初期体重、プログラムの種類、週、週とプログラムの種類の間の交互作用は固定効果です。切片と週は被験者ごとに異なります。
lme = fitlme(tbl,'y ~ InitialWeight + Program*Week + (Week|Subject)');
近似値および応答を計算します。
F = fitted(lme); y = response(lme);
応答と近似値の対比をプロットします。
plot(F,y,'bs') xlabel('Fitted Values') ylabel('Response')
LinearMixedModel | fitted | residuals
fitted
residuals
A modified version of this example exists on your system. Do you want to open this version instead? (ja_JP)
MATLAB のコマンドを実行するリンクがクリックされました。
このリンクは、Web ブラウザーでは動作しません。MATLAB コマンド ウィンドウに以下を入力すると、このコマンドを実行できます。
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office