作者weiching0323 (許惟妮)
看板FJU-STAT95B
標題[專業] 6/1無母數課堂筆記14:40-15:30
時間Tue Jun 1 15:21:59 2010
==================================開始複製====================================
#include <C:\devcpp\all.h>
int main()
{
long int i, j;
srand((unsigned)time(NULL));
cout.setf(ios::fixed); cout.precision(10);
// $$$$$$$$ Start your program here $$$$$$$$$$$$$$$$$$$$$
Matrix Y;
Y.read_from_file("c:\\devcpp\\twoway.dat",1);
Y.print(1);
Two_way_class(4,6,1).print(0);
Matrix C = Two_way_class(4,6,1);
Matrix X = J_Mat(Y.row(),1);
X.print(0);
X.append_column(gen_dummy(C.col(1)));
X.print(0);
Matrix SST, SSR_f, SSR_r, SSE_f, SSE_r;
Part_SS_X_full(Y,X,SST,SSR_r,SSE_r);
cout << "Reduced Model SS = " << endl;
SSR_r.print(3);
SSE_r.print(3);
SST.print(3);
X.append_column(gen_dummy(C.col(0)));
Part_SS_X_full(Y,X,SST,SSR_f,SSE_f);
cout << " Full Model SS = " << endl;
SSR_f.print(3);
SSE_f.print(3);
SST.print(3);
double F = ((SSE_r-SSE_f)/3.0)/
(SSE_f/15.0);
cout << "paramatric approach under normal assumption" << endl;
cout << "F_value = " << F << endl;
cout << "P_value = " << F_r_tailed_prob(F,3,15) << endl;
Partial_F_test(Y,X,6,8);
// $$$$$$$ End of your program $$$$$$$$$$$$$$$$$$$$$$$$$
cin.get();
return 0;
}
======================================複製結束=================================
--
▄▄▄▄▄◣ ◢
▄▄▄▄▄ KEI 沒穿過
acer 水皎嫂 凱馨食品▉建大▏ █雅芳食品 Mizuno 這套戰服
▄雲林尚讚 Mizuno▲南投最美▇▇ ●九泰光電 ●廣吉食品 品
///小美 █ ● 別說你
□ █ inon 參加過
ittt 優 美 興家安速 F-1 ▄▄▄▄▄◣ ◢
▄▄▄▄▄ KEI 沒穿過
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.136.161.81
推 lia90053:耶 謝拉 06/01 15:22
※ 編輯: weiching0323 來自: 140.136.161.81 (06/01 15:27)
推 abidog: 耶 謝拉 06/01 15:49